Parcourir la source

[3156] Declared static consts for unit tests so older versions of gtest would be happy.

Thomas Markwalder il y a 11 ans
Parent
commit
7edd26567a
1 fichiers modifiés avec 9 ajouts et 0 suppressions
  1. 9 0
      src/bin/d2/tests/state_model_unittests.cc

+ 9 - 0
src/bin/d2/tests/state_model_unittests.cc

@@ -235,6 +235,15 @@ public:
     bool work_completed_;
 };
 
+// Declare them so gtest can see them.
+const int StateModelTest::DUMMY_ST;
+const int StateModelTest::READY_ST;
+const int StateModelTest::DO_WORK_ST;
+const int StateModelTest::DONE_ST;
+const int StateModelTest::WORK_START_EVT;
+const int StateModelTest::WORK_DONE_EVT;
+const int StateModelTest::ALL_DONE_EVT;
+
 /// @brief Tests the fundamental methods used for state handler mapping.
 /// Verifies the ability to search for and add entries in the state handler map.
 TEST_F(StateModelTest, basicStateMapping) {