Tidy: modernize-use-nullptr
[alexxy/gromacs.git] / src / gromacs / onlinehelp / tests / helpmanager.cpp
index c9f171f9e6b5e3b93e72c00e07cbd64fc1374c96..19a19fce27b648da0dedcb99c42967f21e1c7a8d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2017, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -76,7 +76,7 @@ class HelpTestBase : public gmx::test::StringTestBase
 };
 
 HelpTestBase::HelpTestBase()
-    : rootTopic_("", NULL, "Root topic text"),
+    : rootTopic_("", nullptr, "Root topic text"),
       writer_(&helpFile_),
       context_(&writer_, gmx::eHelpOutputFormat_Console),
       manager_(rootTopic_, context_)
@@ -100,10 +100,10 @@ TEST_F(HelpManagerTest, HandlesRootTopic)
 TEST_F(HelpManagerTest, HandlesSubTopics)
 {
     MockHelpTopic &first =
-        rootTopic_.addSubTopic("first", "First topic", NULL);
+        rootTopic_.addSubTopic("first", "First topic", nullptr);
     MockHelpTopic &firstSub =
-        first.addSubTopic("firstsub", "First subtopic", NULL);
-    rootTopic_.addSubTopic("second", "Second topic", NULL);
+        first.addSubTopic("firstsub", "First subtopic", nullptr);
+    rootTopic_.addSubTopic("second", "Second topic", nullptr);
 
     using ::testing::_;
     EXPECT_CALL(firstSub, writeHelp(_));
@@ -115,9 +115,9 @@ TEST_F(HelpManagerTest, HandlesSubTopics)
 TEST_F(HelpManagerTest, HandlesInvalidTopics)
 {
     MockHelpTopic &first =
-        rootTopic_.addSubTopic("first", "First topic", NULL);
-    first.addSubTopic("firstsub", "First subtopic", NULL);
-    rootTopic_.addSubTopic("second", "Second topic", NULL);
+        rootTopic_.addSubTopic("first", "First topic", nullptr);
+    first.addSubTopic("firstsub", "First subtopic", nullptr);
+    rootTopic_.addSubTopic("second", "Second topic", nullptr);
 
     ASSERT_THROW_GMX(manager_.enterTopic("unknown"), gmx::InvalidInputError);
     ASSERT_NO_THROW_GMX(manager_.enterTopic("first"));