From 758d04210d7683e17602ff3b6329c41c253672bc Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=A2=85=ED=98=84/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Staff=20Engineer/=EC=82=BC=EC=84=B1?= =?utf8?q?=EC=A0=84=EC=9E=90?= Date: Thu, 16 Aug 2018 18:47:59 +0900 Subject: [PATCH] [coco] Share mock-up Use class (#1055) This commit extracts mock-up Use class from UseHook/UseSlot tests, and shares the extracted one for both tests. Signed-off-by: Jonghyun Park --- contrib/coco/core/src/IR/Use.mock.h | 16 ++++++++++++++++ contrib/coco/core/src/IR/UseHook.test.cpp | 12 ++---------- contrib/coco/core/src/IR/UseSlot.test.cpp | 12 ++---------- 3 files changed, 20 insertions(+), 20 deletions(-) create mode 100644 contrib/coco/core/src/IR/Use.mock.h diff --git a/contrib/coco/core/src/IR/Use.mock.h b/contrib/coco/core/src/IR/Use.mock.h new file mode 100644 index 0000000..830ffdd --- /dev/null +++ b/contrib/coco/core/src/IR/Use.mock.h @@ -0,0 +1,16 @@ +#ifndef __COCO_IR_USE_MOCK_H__ +#define __COCO_IR_USE_MOCK_H__ + +#include "coco/IR/Object.h" + +namespace +{ +namespace mock +{ +struct Use final : public coco::Object::Use +{ +}; +} // namespace mock +} // namespace + +#endif // __COCO_IR_USE_MOCK_H__ diff --git a/contrib/coco/core/src/IR/UseHook.test.cpp b/contrib/coco/core/src/IR/UseHook.test.cpp index 5e9fb78..44169aa 100644 --- a/contrib/coco/core/src/IR/UseHook.test.cpp +++ b/contrib/coco/core/src/IR/UseHook.test.cpp @@ -4,17 +4,9 @@ #include "coco/IR/FeatureObject.h" -#include +#include "Use.mock.h" -namespace -{ -namespace mock -{ -struct Use final : public coco::Object::Use -{ -}; -} // namespace mock -} // namespace +#include namespace { diff --git a/contrib/coco/core/src/IR/UseSlot.test.cpp b/contrib/coco/core/src/IR/UseSlot.test.cpp index bac3caf..1f7773b 100644 --- a/contrib/coco/core/src/IR/UseSlot.test.cpp +++ b/contrib/coco/core/src/IR/UseSlot.test.cpp @@ -4,17 +4,9 @@ #include "coco/IR/FeatureObject.h" -#include +#include "Use.mock.h" -namespace -{ -namespace mock -{ -struct Use final : public coco::Object::Use -{ -}; -} // namespace mock -} // namespace +#include namespace { -- 2.7.4