From 00b2f18c177ba8698d4e95e01da60f06334f5782 Mon Sep 17 00:00:00 2001 From: Zixuan Ma <31761176+JohndeVostok@users.noreply.github.com> Date: Wed, 19 Oct 2022 15:03:03 +0800 Subject: [PATCH] Fix: unsigned compare in test (#50) fix: unsigned compare in test. Test project /home/mazx/git/InfiniTensor/build Start 1: test_graph 1/18 Test #1: test_graph ....................... Passed 0.03 sec Start 2: test_hash 2/18 Test #2: test_hash ........................ Passed 0.01 sec Start 3: test_tensor_save 3/18 Test #3: test_tensor_save ................. Passed 0.02 sec Start 4: test_verify 4/18 Test #4: test_verify ...................... Passed 0.01 sec Start 5: test_batch_norm 5/18 Test #5: test_batch_norm .................. Passed 0.01 sec Start 6: test_concat 6/18 Test #6: test_concat ...................... Passed 0.01 sec Start 7: test_conv 7/18 Test #7: test_conv ........................ Passed 0.24 sec Start 8: test_conv_transposed_2d 8/18 Test #8: test_conv_transposed_2d .......... Passed 0.01 sec Start 9: test_element_wise 9/18 Test #9: test_element_wise ................ Passed 0.01 sec Start 10: test_extend 10/18 Test #10: test_extend ...................... Passed 0.01 sec Start 11: test_gather 11/18 Test #11: test_gather ...................... Passed 0.01 sec Start 12: test_matmul 12/18 Test #12: test_matmul ...................... Passed 0.01 sec Start 13: test_pad 13/18 Test #13: test_pad ......................... Passed 0.01 sec Start 14: test_pooling 14/18 Test #14: test_pooling ..................... Passed 0.01 sec Start 15: test_reduce_mean 15/18 Test #15: test_reduce_mean ................. Passed 0.01 sec Start 16: test_reshape 16/18 Test #16: test_reshape ..................... Passed 0.01 sec Start 17: test_slice 17/18 Test #17: test_slice ....................... Passed 0.01 sec Start 18: test_split 18/18 Test #18: test_split ....................... Passed 0.02 sec 100% tests passed, 0 tests failed out of 18 --- test/core/test_graph.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/core/test_graph.cc b/test/core/test_graph.cc index 28ed0e4f..0d1086fc 100644 --- a/test/core/test_graph.cc +++ b/test/core/test_graph.cc @@ -18,14 +18,14 @@ TEST(Graph, build_and_run) { auto matmul = g->addOpWithOutputs(i0, w0, o0); g->print(); // check inputOf and outputsOf for tensor - EXPECT_EQ(i0->getInputOf().size(), 1); - EXPECT_EQ(w0->getInputOf().size(), 1); - EXPECT_EQ(o0->getInputOf().size(), 0); + EXPECT_EQ(i0->getInputOf().size(), 1u); + EXPECT_EQ(w0->getInputOf().size(), 1u); + EXPECT_EQ(o0->getInputOf().size(), 0u); EXPECT_EQ(i0->getOutputOf(), nullptr); EXPECT_EQ(w0->getOutputOf(), nullptr); EXPECT_NE(o0->getOutputOf(), nullptr); - EXPECT_EQ(matmul->getPredecessors().size(), 0); - EXPECT_EQ(matmul->getSuccessors().size(), 0); + EXPECT_EQ(matmul->getPredecessors().size(), 0u); + EXPECT_EQ(matmul->getSuccessors().size(), 0u); runtime->run(g); // check execution results