From: 박천교/On-Device Lab(SR)/Engineer/삼성전자 Date: Wed, 24 Jul 2019 00:02:41 +0000 (+0900) Subject: [locomotiv] Use array instead of set for test Session (#5779) X-Git-Tag: submit/tizen/20190809.050447~462 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eae3dcb477f6b17eb77ac7087b58c6a99b65222b;p=platform%2Fcore%2Fml%2Fnnfw.git [locomotiv] Use array instead of set for test Session (#5779) * [locomotiv] Use array instead of set for test Session To avoid undefined behavior, this commit use array instead of set to make Session from iterator range. Signed-off-by: Cheongyo Bahk * Use aggregate initializer to be simple --- diff --git a/compiler/locomotiv/src/Session.test.cpp b/compiler/locomotiv/src/Session.test.cpp index c29f26e..27fe074 100644 --- a/compiler/locomotiv/src/Session.test.cpp +++ b/compiler/locomotiv/src/Session.test.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include @@ -310,9 +310,7 @@ TEST(Session, ctor_by_range) relu->input(constgen); push->from(relu); - std::set custom_outputs; - custom_outputs.insert(constgen); - custom_outputs.insert(push); + std::array custom_outputs = {constgen, push}; // Make Session by range locomotiv::Session s(g.get(), custom_outputs.begin(), custom_outputs.end());