瀏覽代碼

Improved StateConnection class

- renamed "getState" method
pcmattulat 4 年之前
父節點
當前提交
b82750e044
共有 3 個文件被更改,包括 3 次插入3 次删除
  1. 1 1
      source/logic/StateConnection.cpp
  2. 1 1
      source/logic/StateConnection.hpp
  3. 1 1
      test/cases/logic/StateConnectionTest.cpp

+ 1 - 1
source/logic/StateConnection.cpp

@@ -19,7 +19,7 @@ ls_std::StateConnectionId ls_std::StateConnection::getConnectionId() {
   return this->connectionId;
   return this->connectionId;
 }
 }
 
 
-ls_std::StateId ls_std::StateConnection::getState() {
+ls_std::StateId ls_std::StateConnection::getStateId() {
   return this->stateId;
   return this->stateId;
 }
 }
 
 

+ 1 - 1
source/logic/StateConnection.hpp

@@ -23,7 +23,7 @@ namespace ls_std {
       ~StateConnection() = default;
       ~StateConnection() = default;
 
 
       StateConnectionId getConnectionId();
       StateConnectionId getConnectionId();
-      StateId getState();
+      StateId getStateId();
       bool isPassable();
       bool isPassable();
       void updatePassCondition(bool _condition);
       void updatePassCondition(bool _condition);
 
 

+ 1 - 1
test/cases/logic/StateConnectionTest.cpp

@@ -30,7 +30,7 @@ namespace {
   TEST_F(StateConnectionTest, getState)
   TEST_F(StateConnectionTest, getState)
   {
   {
     ls_std::StateConnection connection {"AB", "B"};
     ls_std::StateConnection connection {"AB", "B"};
-    ASSERT_STREQ("B", connection.getState().c_str());
+    ASSERT_STREQ("B", connection.getStateId().c_str());
   }
   }
 
 
   TEST_F(StateConnectionTest, isPassable)
   TEST_F(StateConnectionTest, isPassable)