am 849e162d
: Merge "Use the float/double assert macros."
* commit '849e162d3bedc5ca61bdf15486268b253b9f4e93': Use the float/double assert macros.
This commit is contained in:
commit
6bde44a6a2
@ -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);
|
||||
}
|
||||
|
@ -188,17 +188,17 @@ TEST(stdlib, system) {
|
||||
}
|
||||
|
||||
TEST(stdlib, atof) {
|
||||
ASSERT_EQ(1.23, atof("1.23"));
|
||||
ASSERT_DOUBLE_EQ(1.23, atof("1.23"));
|
||||
}
|
||||
|
||||
TEST(stdlib, strtod) {
|
||||
ASSERT_EQ(1.23, strtod("1.23", NULL));
|
||||
ASSERT_DOUBLE_EQ(1.23, strtod("1.23", NULL));
|
||||
}
|
||||
|
||||
TEST(stdlib, strtof) {
|
||||
ASSERT_EQ(1.23, strtod("1.23", NULL));
|
||||
ASSERT_FLOAT_EQ(1.23, strtof("1.23", NULL));
|
||||
}
|
||||
|
||||
TEST(stdlib, strtold) {
|
||||
ASSERT_EQ(1.23, strtold("1.23", NULL));
|
||||
ASSERT_DOUBLE_EQ(1.23, strtold("1.23", NULL));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user