MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TEST_P

Function TEST_P

tensorflow/lite/toco/tooling_util_test.cc:71–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69class ShapeTest : public ::testing::TestWithParam<ShapePair> {};
70
71TEST_P(ShapeTest, Agrees) {
72 const ShapePair& param = GetParam();
73
74 switch (param.agreement) {
75 case Agreement::kBroadcast: {
76 EXPECT_TRUE(ShapesAgreeUpToBroadcasting(param.left, param.right));
77 break;
78 }
79 case Agreement::kExtend: {
80 EXPECT_TRUE(ShapesAgreeUpToExtending(param.left, param.right));
81 // Anything that extends should also broadcast.
82 EXPECT_TRUE(ShapesAgreeUpToBroadcasting(param.left, param.right));
83 break;
84 }
85 case Agreement::kBroadcastNotExtend: {
86 // Verify that it strictly broadcasts but does not extend.
87 EXPECT_TRUE(ShapesAgreeUpToBroadcasting(param.left, param.right));
88 EXPECT_FALSE(ShapesAgreeUpToExtending(param.left, param.right));
89 break;
90 }
91 case Agreement::kNeither: {
92 EXPECT_FALSE(ShapesAgreeUpToExtending(param.left, param.right));
93 EXPECT_FALSE(ShapesAgreeUpToBroadcasting(param.left, param.right));
94 break;
95 }
96 }
97}
98
99INSTANTIATE_TEST_SUITE_P(AgreeBroadcast, ShapeTest,
100 ::testing::ValuesIn(CreateShapePairs()));

Callers

nothing calls this directly

Calls 3

GetParamFunction · 0.85
ShapesAgreeUpToExtendingFunction · 0.85

Tested by

no test coverage detected