diff options
Diffstat (limited to 'googletest/test/gtest-unittest-api_test.cc')
-rw-r--r-- | googletest/test/gtest-unittest-api_test.cc | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/googletest/test/gtest-unittest-api_test.cc b/googletest/test/gtest-unittest-api_test.cc index b1f5168..7898286 100644 --- a/googletest/test/gtest-unittest-api_test.cc +++ b/googletest/test/gtest-unittest-api_test.cc @@ -25,10 +25,9 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + // -// Author: vladl@google.com (Vlad Losev) -// -// The Google C++ Testing Framework (Google Test) +// The Google C++ Testing and Mocking Framework (Google Test) // // This file contains tests verifying correctness of data provided via // UnitTest's public methods. @@ -77,7 +76,7 @@ class UnitTestHelper { if (0 == strcmp(test_case->name(), name)) return test_case; } - return NULL; + return nullptr; } // Returns the array of pointers to all tests in a particular test case @@ -138,7 +137,7 @@ TEST(ApiTest, UnitTestImmutableAccessorsWork) { } AssertionResult IsNull(const char* str) { - if (str != NULL) { + if (str != nullptr) { return testing::AssertionFailure() << "argument is " << str; } return AssertionSuccess(); @@ -146,7 +145,7 @@ AssertionResult IsNull(const char* str) { TEST(ApiTest, TestCaseImmutableAccessorsWork) { const TestCase* test_case = UnitTestHelper::FindTestCase("ApiTest"); - ASSERT_TRUE(test_case != NULL); + ASSERT_TRUE(test_case != nullptr); EXPECT_STREQ("ApiTest", test_case->name()); EXPECT_TRUE(IsNull(test_case->type_param())); @@ -182,11 +181,11 @@ TEST(ApiTest, TestCaseImmutableAccessorsWork) { EXPECT_TRUE(tests[3]->should_run()); delete[] tests; - tests = NULL; + tests = nullptr; #if GTEST_HAS_TYPED_TEST test_case = UnitTestHelper::FindTestCase("TestCaseWithCommentTest/0"); - ASSERT_TRUE(test_case != NULL); + ASSERT_TRUE(test_case != nullptr); EXPECT_STREQ("TestCaseWithCommentTest/0", test_case->name()); EXPECT_STREQ(GetTypeName<int>().c_str(), test_case->type_param()); @@ -209,7 +208,7 @@ TEST(ApiTest, TestCaseImmutableAccessorsWork) { TEST(ApiTest, TestCaseDisabledAccessorsWork) { const TestCase* test_case = UnitTestHelper::FindTestCase("DISABLED_Test"); - ASSERT_TRUE(test_case != NULL); + ASSERT_TRUE(test_case != nullptr); EXPECT_STREQ("DISABLED_Test", test_case->name()); EXPECT_TRUE(IsNull(test_case->type_param())); |