[coco] Rename mock-up Read as Readers (#1469)
author박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Wed, 12 Sep 2018 07:43:13 +0000 (16:43 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Wed, 12 Sep 2018 07:43:13 +0000 (16:43 +0900)
The name of this mock-up class is not changed during refactoring in
order to reduce the amount of code diffs.

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

diff --git a/contrib/coco/core/src/IR/Read.mock.h b/contrib/coco/core/src/IR/Read.mock.h
deleted file mode 100644 (file)
index 5e52877..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef __COCO_IR_READ_MOCK_H__
-#define __COCO_IR_READ_MOCK_H__
-
-#include "coco/IR/Bag.h"
-
-namespace
-{
-namespace mock
-{
-// TODO Rename as Reader
-struct Read final : public coco::Bag::Reader
-{
-  coco::Instr *loc(void) override { return nullptr; }
-};
-} // namespace mock
-} // namespace
-
-#endif // __COCO_IR_READ_MOCK_H__
index 88f70f2..79d4e0f 100644 (file)
@@ -2,7 +2,7 @@
 #include "coco/IR/BagInfo.h"
 #include "coco/IR/BagManager.h"
 
-#include "Read.mock.h"
+#include "Reader.mock.h"
 
 #include <gtest/gtest.h>
 
@@ -19,7 +19,8 @@ protected:
 
 TEST_F(ReadTest, constructor)
 {
-  ::mock::Read read;
+  // TODO Rename 'read' as 'reader'
+  ::mock::Reader read;
 
   // TODO Rename 'slot'
   coco::Read slot{&bag_link, &read};
@@ -29,7 +30,8 @@ TEST_F(ReadTest, constructor)
 
 TEST_F(ReadTest, value)
 {
-  ::mock::Read read;
+  // TODO Rename 'read' as 'reader'
+  ::mock::Reader read;
 
   // TODO Rename 'slot'
   coco::Read slot{&bag_link, &read};
@@ -52,7 +54,8 @@ TEST_F(ReadTest, value)
 
 TEST_F(ReadTest, unlink_on_destruction)
 {
-  ::mock::Read reader;
+  // TODO Rename 'read' as 'reader'
+  ::mock::Reader reader;
 
   auto bag = bag_mgr.create(1);
 
diff --git a/contrib/coco/core/src/IR/Reader.mock.h b/contrib/coco/core/src/IR/Reader.mock.h
new file mode 100644 (file)
index 0000000..0cafe3a
--- /dev/null
@@ -0,0 +1,17 @@
+#ifndef __COCO_IR_READER_MOCK_H__
+#define __COCO_IR_READER_MOCK_H__
+
+#include "coco/IR/Bag.h"
+
+namespace
+{
+namespace mock
+{
+struct Reader final : public coco::Bag::Reader
+{
+  coco::Instr *loc(void) override { return nullptr; }
+};
+} // namespace mock
+} // namespace
+
+#endif // __COCO_IR_READER_MOCK_H__