diff options
author | Christopher Ferris <cferris@google.com> | 2014-03-17 16:40:26 -0700 |
---|---|---|
committer | Christopher Ferris <cferris@google.com> | 2014-03-17 16:40:26 -0700 |
commit | f171b34cf045115b82ccb89b57feb56d3cad472b (patch) | |
tree | 60d746b63387b151f00dfd3272773f2701e93929 /tests/stdio_test.cpp | |
parent | f212bbf666b77777063a3a94a672bcae80b15253 (diff) |
Use the float/double assert macros.
The normal ASSERT_EQ macros don't work quite right for float/double values,
and result in false failures. Use the correct macros instead.
Bug: 13511379
Change-Id: Ic2feee7f3d3569f57b6453b8fa95222846c625cd
Diffstat (limited to 'tests/stdio_test.cpp')
-rw-r--r-- | tests/stdio_test.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/stdio_test.cpp b/tests/stdio_test.cpp index 893e057b7..8c1cef901 100644 --- a/tests/stdio_test.cpp +++ b/tests/stdio_test.cpp @@ -381,5 +381,5 @@ TEST(stdio, sscanf) { ASSERT_EQ(3, sscanf(" hello 123 1.23 ", "%s %i %lf %s", s1, &i1, &d1, s2)); ASSERT_STREQ("hello", s1); ASSERT_EQ(123, i1); - ASSERT_EQ(1.23, d1); + ASSERT_DOUBLE_EQ(1.23, d1); } |