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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user