Skip to content

Commit 82a6b00

Browse files
author
NeiroYT
committed
Tidy
1 parent 66b8cc5 commit 82a6b00

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

test/graph/test_graph.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,28 @@ TEST(graph, test_new_setOutput) {
7070
ASSERT_NO_THROW(graph.setOutput(output));
7171
}
7272

73+
TEST(graph, test_new_setInput_throw) {
74+
const std::vector<float> vec1 = {2.0F, 1.5F, 0.1F, 1.9F, 0.0F, 5.5F};
75+
Tensor weights = make_tensor<float>(vec1, {3, 2});
76+
Tensor bias = make_tensor<float>({0.5F, 0.5F, 1.0F});
77+
Tensor input = make_tensor<float>({1.0F, 2.0F}, {2});
78+
Tensor output;
79+
Graph graph;
80+
81+
ASSERT_ANY_THROW(graph.setInput(input));
82+
}
83+
84+
TEST(graph, test_new_setOutput_throw) {
85+
const std::vector<float> vec1 = {2.0F, 1.5F, 0.1F, 1.9F, 0.0F, 5.5F};
86+
Tensor weights = make_tensor<float>(vec1, {3, 2});
87+
Tensor bias = make_tensor<float>({0.5F, 0.5F, 1.0F});
88+
Tensor input = make_tensor<float>({1.0F, 2.0F}, {2});
89+
Tensor output;
90+
Graph graph;
91+
92+
ASSERT_ANY_THROW(graph.setOutput(output));
93+
}
94+
7395
TEST(graph, test_deep_copy) {
7496
Graph graph;
7597
Graph graph2;

0 commit comments

Comments
 (0)