| `ASSERT_NEAR(val1, val2, abs_error);` | `EXPECT_NEAR(val1, val2, abs_error);` | the difference between `val1` and `val2` doesn't exceed the given absolute error |
| `ASSERT_NEAR(val1, | `EXPECT_NEAR(val1, val2, | the difference between |
@@ -193,8 +193,7 @@ objects, you should use `ASSERT_EQ`.
...
@@ -193,8 +193,7 @@ objects, you should use `ASSERT_EQ`.
When doing pointer comparisons use `*_EQ(ptr, nullptr)` and `*_NE(ptr, nullptr)`
When doing pointer comparisons use `*_EQ(ptr, nullptr)` and `*_NE(ptr, nullptr)`
instead of `*_EQ(ptr, NULL)` and `*_NE(ptr, NULL)`. This is because `nullptr` is
instead of `*_EQ(ptr, NULL)` and `*_NE(ptr, NULL)`. This is because `nullptr` is
typed while `NULL` is not. See [FAQ](faq.md#why-does-googletest-support-expect_eqnull-ptr-and-assert_eqnull-ptr-but-not-expect_nenull-ptr-and-assert_nenull-ptr)
typed while `NULL` is not. See [FAQ](faq.md)for more details.
for more details.
If you're working with floating point numbers, you may want to use the floating
If you're working with floating point numbers, you may want to use the floating
point variations of some of these macros in order to avoid problems caused by
point variations of some of these macros in order to avoid problems caused by
...
@@ -295,8 +294,8 @@ should be in the same test suite; in other words, the first argument to their
...
@@ -295,8 +294,8 @@ should be in the same test suite; in other words, the first argument to their
suite `FactorialTest`.
suite `FactorialTest`.
When naming your test suites and tests, you should follow the same convention as
When naming your test suites and tests, you should follow the same convention as