[coco] Rename mock-up Bag::Updater (#1575)
author박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Wed, 19 Sep 2018 10:12:57 +0000 (19:12 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Wed, 19 Sep 2018 10:12:57 +0000 (19:12 +0900)
Currently, its name is "Update" although it inherits "Bag::Updater".

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
contrib/coco/core/src/IR/Update.mock.h [deleted file]
contrib/coco/core/src/IR/Update.test.cpp
contrib/coco/core/src/IR/Updater.mock.h [new file with mode: 0644]

diff --git a/contrib/coco/core/src/IR/Update.mock.h b/contrib/coco/core/src/IR/Update.mock.h
deleted file mode 100644 (file)
index fe8ff11..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef __COCO_IR_UPDATE_MOCK_H__
-#define __COCO_IR_UPDATE_MOCK_H__
-
-#include "coco/IR/Bag.h"
-
-namespace
-{
-namespace mock
-{
-// TODO Rename as Updater
-struct Update final : public coco::Bag::Updater
-{
-  coco::Instr *loc(void) override { return nullptr; }
-};
-} // namespace mock
-} // namespace
-
-#endif // __COCO_IR_UPDATE_MOCK_H__
index 7bb73c5..e88d54c 100644 (file)
@@ -1,7 +1,7 @@
 #include "coco/IR/Update.h"
 #include "coco/IR/BagManager.h"
 
-#include "Update.mock.h"
+#include "Updater.mock.h"
 
 #include <gtest/gtest.h>
 
@@ -16,7 +16,8 @@ protected:
 
 TEST_F(UpdateTest, constructor)
 {
-  ::mock::Update update;
+  // TODO Rename 'update'
+  ::mock::Updater update;
 
   // TODO Rename 'slot'
   coco::Update slot{&update};
@@ -26,7 +27,8 @@ TEST_F(UpdateTest, constructor)
 
 TEST_F(UpdateTest, value)
 {
-  ::mock::Update update;
+  // TODO Rename 'update'
+  ::mock::Updater update;
 
   // TODO Rename 'slot'
   coco::Update slot{&update};
@@ -49,7 +51,7 @@ TEST_F(UpdateTest, value)
 
 TEST_F(UpdateTest, unlink_on_destruction)
 {
-  ::mock::Update updater;
+  ::mock::Updater updater;
 
   auto bag = bag_mgr.create(1);
 
diff --git a/contrib/coco/core/src/IR/Updater.mock.h b/contrib/coco/core/src/IR/Updater.mock.h
new file mode 100644 (file)
index 0000000..04ff88b
--- /dev/null
@@ -0,0 +1,17 @@
+#ifndef __COCO_IR_UPDATER_MOCK_H__
+#define __COCO_IR_UPDATER_MOCK_H__
+
+#include "coco/IR/Bag.h"
+
+namespace
+{
+namespace mock
+{
+struct Updater final : public coco::Bag::Updater
+{
+  coco::Instr *loc(void) override { return nullptr; }
+};
+} // namespace mock
+} // namespace
+
+#endif // __COCO_IR_UPDATER_MOCK_H__