[coco] Rename 'Use' mock-up class (#1626)
author박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Thu, 27 Sep 2018 05:12:26 +0000 (14:12 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Thu, 27 Sep 2018 05:12:26 +0000 (14:12 +0900)
This commit renames 'Use' mock-up class as 'Consumer'.

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

diff --git a/contrib/coco/core/src/IR/Consumer.mock.h b/contrib/coco/core/src/IR/Consumer.mock.h
new file mode 100644 (file)
index 0000000..81d1ff5
--- /dev/null
@@ -0,0 +1,17 @@
+#ifndef __COCO_IR_CONSUMER_MOCK_H__
+#define __COCO_IR_CONSUMER_MOCK_H__
+
+#include "coco/IR/Object.h"
+
+namespace
+{
+namespace mock
+{
+struct Consumer final : public coco::Object::Consumer
+{
+  coco::Instr *loc(void) override { return nullptr; }
+};
+} // namespace mock
+} // namespace
+
+#endif // __COCO_IR_CONSUMER_MOCK_H__
diff --git a/contrib/coco/core/src/IR/Use.mock.h b/contrib/coco/core/src/IR/Use.mock.h
deleted file mode 100644 (file)
index e98adf1..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef __COCO_IR_USE_MOCK_H__
-#define __COCO_IR_USE_MOCK_H__
-
-#include "coco/IR/Object.h"
-
-namespace
-{
-namespace mock
-{
-// TODO Rename class
-struct Use final : public coco::Object::Consumer
-{
-  coco::Instr *loc(void) override { return nullptr; }
-};
-} // namespace mock
-} // namespace
-
-#endif // __COCO_IR_USE_MOCK_H__
index fba4c8a..35de56b 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "coco/IR/FeatureObject.h"
 
-#include "Use.mock.h"
+#include "Consumer.mock.h"
 
 #include <gtest/gtest.h>
 
@@ -20,7 +20,8 @@ TEST_F(UseTest, constructor)
 {
   auto o = obj_mgr.create(nncc::core::ADT::feature::Shape{1, 1, 1});
 
-  ::mock::Use use;
+  // TODO Rename 'use'
+  ::mock::Consumer use;
 
   coco::Use slot{&use};
 
@@ -31,7 +32,8 @@ TEST_F(UseTest, value)
 {
   auto o = obj_mgr.create(nncc::core::ADT::feature::Shape{1, 1, 1});
 
-  ::mock::Use use;
+  // TODO Rename 'use'
+  ::mock::Consumer use;
 
   coco::Use slot{&use};