6 #include <boost/test/unit_test.hpp> 69 BOOST_REQUIRE_THROW(Setup({ { "input0", {2, 3} },
70 {
"input1", {1, 2, 2, 3} } },
75 struct GreaterFixtureAutoSetup :
public GreaterFixture
81 Setup({ {
"input0", input0Shape },
82 {
"input1", input1Shape } },
87 struct GreaterFixtureTwoByTwo :
public GreaterFixtureAutoSetup
89 GreaterFixtureTwoByTwo() : GreaterFixtureAutoSetup({2, 2}, {2, 2}) {}
94 RunComparisonTest<2>({ {
"input0", { 1.0f, 2.0f, 3.0f, 4.0f} },
95 {
"input1", { 1.0f, 5.0f, 2.0f, 2.0f} } },
96 { {
"output", { 0, 0, 1, 1} } });
99 struct GreaterBroadcast1DAnd4D :
public GreaterFixtureAutoSetup
101 GreaterBroadcast1DAnd4D() : GreaterFixtureAutoSetup({1}, {1,1,2,2}) {}
106 RunComparisonTest<4>({ {
"input0", { 2.0f } },
107 {
"input1", { 1.0f, 2.0f, 3.0f, 2.0f } } },
108 { {
"output", { 1, 0, 0, 0 } } });
111 struct GreaterBroadcast4DAnd1D :
public GreaterFixtureAutoSetup
113 GreaterBroadcast4DAnd1D() : GreaterFixtureAutoSetup({1,1,2,2}, {1}) {}
118 RunComparisonTest<4>({ {
"input0", { 1.0f, 2.0f, 3.0f, 2.0f } },
119 {
"input1", { 3.0f } } },
120 { {
"output", { 0, 0, 0, 0 } } });
123 struct GreaterMultiDimBroadcast :
public GreaterFixtureAutoSetup
125 GreaterMultiDimBroadcast() : GreaterFixtureAutoSetup({1,1,2,1}, {1,2,1,3}) {}
130 RunComparisonTest<4>({ {
"input0", { 1.0f, 2.0f } },
131 {
"input1", { 1.0f, 2.0f, 3.0f,
132 3.0f, 2.0f, 2.0f } } },
133 { {
"output", { 0, 0, 0,
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
BOOST_FIXTURE_TEST_CASE(ParseGreaterUnsupportedBroadcast, GreaterFixture)
BOOST_AUTO_TEST_SUITE_END()