tester.output("const/float");
tester.run(nodedef, graphbuilder);
- auto test_node = dynamic_cast<moco::TFConst *>(tester.output());
+ auto test_node = loco::must_cast<moco::TFConst *>(tester.output());
ASSERT_NE(test_node, nullptr);
ASSERT_EQ(test_node->size<loco::DataType::FLOAT32>(), 6);
ASSERT_EQ(test_node->at<loco::DataType::FLOAT32>(0), 1.1f);
tester.output("const/float");
tester.run(nodedef, graphbuilder);
- auto test_node = dynamic_cast<moco::TFConst *>(tester.output());
+ auto test_node = loco::must_cast<moco::TFConst *>(tester.output());
ASSERT_NE(test_node, nullptr);
ASSERT_EQ(test_node->size<loco::DataType::FLOAT32>(), 6);
ASSERT_EQ(test_node->at<loco::DataType::FLOAT32>(0), 1.1f);
tester.output("const/float");
tester.run(nodedef, graphbuilder);
- auto test_node = dynamic_cast<moco::TFConst *>(tester.output());
+ auto test_node = loco::must_cast<moco::TFConst *>(tester.output());
ASSERT_NE(test_node, nullptr);
ASSERT_EQ(test_node->size<loco::DataType::FLOAT32>(), 6);
ASSERT_EQ(test_node->at<loco::DataType::FLOAT32>(0), 1.1f);
tester.output("const/float");
tester.run(nodedef, graphbuilder);
- auto test_node = dynamic_cast<moco::TFConst *>(tester.output());
+ auto test_node = loco::must_cast<moco::TFConst *>(tester.output());
ASSERT_NE(test_node, nullptr);
ASSERT_EQ(test_node->size<loco::DataType::FLOAT32>(), 6);
ASSERT_EQ(test_node->at<loco::DataType::FLOAT32>(0), 1.1f);
tester.output("const/int");
tester.run(nodedef, graphbuilder);
- auto test_node = dynamic_cast<moco::TFConst *>(tester.output());
+ auto test_node = loco::must_cast<moco::TFConst *>(tester.output());
ASSERT_NE(test_node, nullptr);
ASSERT_EQ(test_node->size<loco::DataType::S32>(), 6);
ASSERT_EQ(test_node->at<loco::DataType::S32>(0), 1);
tester.output("const/int");
tester.run(nodedef, graphbuilder);
- auto test_node = dynamic_cast<moco::TFConst *>(tester.output());
+ auto test_node = loco::must_cast<moco::TFConst *>(tester.output());
ASSERT_NE(test_node, nullptr);
ASSERT_EQ(test_node->size<loco::DataType::S32>(), 1);
ASSERT_EQ(test_node->at<loco::DataType::S32>(0), 3);
tester.output("const/int8");
tester.run(nodedef, graphbuilder);
- auto test_node = dynamic_cast<moco::TFConst *>(tester.output());
+ auto test_node = loco::must_cast<moco::TFConst *>(tester.output());
ASSERT_NE(test_node, nullptr);
ASSERT_EQ(test_node->size<loco::DataType::S8>(), 6);
ASSERT_EQ(test_node->at<loco::DataType::S8>(0), 0);