diff options
Diffstat (limited to 'runtimes/neurun/test/graph/operand/IndexSet.cc')
-rw-r--r-- | runtimes/neurun/test/graph/operand/IndexSet.cc | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/runtimes/neurun/test/graph/operand/IndexSet.cc b/runtimes/neurun/test/graph/operand/IndexSet.cc index eeb4cef97..de4768cda 100644 --- a/runtimes/neurun/test/graph/operand/IndexSet.cc +++ b/runtimes/neurun/test/graph/operand/IndexSet.cc @@ -16,12 +16,12 @@ #include <gtest/gtest.h> -#include "graph/operand/IndexSet.h" +#include "model/operand/IndexSet.h" -using neurun::graph::operand::Index; -using neurun::graph::operand::IndexSet; +using neurun::model::operand::Index; +using neurun::model::operand::IndexSet; -TEST(graph_operand_IndexSet, index_set_test) +TEST(graph_operand_IndexSet, append) { IndexSet iset{0, 2, 4, 8}; @@ -31,8 +31,8 @@ TEST(graph_operand_IndexSet, index_set_test) ASSERT_EQ(iset.size(), 5); - neurun::graph::operand::IO::Index index1{1}; - neurun::graph::operand::IO::Index index2{4}; + neurun::model::operand::IO::Index index1{1}; + neurun::model::operand::IO::Index index2{4}; ASSERT_EQ(iset.at(index1), 2); ASSERT_EQ(iset.at(index2), 10); @@ -41,3 +41,12 @@ TEST(graph_operand_IndexSet, index_set_test) ASSERT_TRUE(iset.contains(Index{10})); ASSERT_FALSE(iset.contains(Index{11})); } + +TEST(graph_operand_IndexSet, replace) +{ + IndexSet iset{0, 1, 2, 3}; + + iset.replace(Index{1}, Index{9}); + ASSERT_FALSE(iset.contains(Index{1})); + ASSERT_TRUE(iset.contains(Index{9})); +} |