From: 박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 Date: Wed, 25 Jul 2018 01:48:02 +0000 (+0900) Subject: [coco] Support copy over ElemID (#786) X-Git-Tag: nncc_backup~2322 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5bd00e9fdc0622146f40908c8834310cd79625be;p=platform%2Fcore%2Fml%2Fnnfw.git [coco] Support copy over ElemID (#786) This commit supports copy over ElemID values. Signed-off-by: Jonghyun Park --- diff --git a/contrib/coco/core/include/coco/IR/ElemID.h b/contrib/coco/core/include/coco/IR/ElemID.h index 6cacef8..115bfa3 100644 --- a/contrib/coco/core/include/coco/IR/ElemID.h +++ b/contrib/coco/core/include/coco/IR/ElemID.h @@ -24,7 +24,7 @@ public: uint32_t value(void) const { return _value; } private: - uint32_t const _value; + uint32_t _value; }; } // namespace coco diff --git a/contrib/coco/core/src/IR/ElemID.test.cpp b/contrib/coco/core/src/IR/ElemID.test.cpp index 545846e..f1d51ae 100644 --- a/contrib/coco/core/src/IR/ElemID.test.cpp +++ b/contrib/coco/core/src/IR/ElemID.test.cpp @@ -11,6 +11,16 @@ TEST(IR_ELEM_ID, constructor) ASSERT_EQ(id.value(), 128); } +TEST(IR_ELEM_ID, copy) +{ + coco::ElemID src{16}; + coco::ElemID dst{32}; + + dst = src; + + ASSERT_EQ(dst.value(), 16); +} + TEST(IR_ELEM_ID, std_vector_compatible) { // ElemID SHOULD be compatible with standard container (including std::vector)