|
|
|
@ -31,8 +31,23 @@ class UTEST_omg_omg : public testing::Test {
|
|
|
|
|
void TearDown() override {}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
TEST_F(UTEST_omg_omg, display_model_info_failed)
|
|
|
|
|
{
|
|
|
|
|
ge::proto::ModelDef model_def;
|
|
|
|
|
PrintModelInfo(&model_def);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TEST_F(UTEST_omg_omg, display_model_info_success)
|
|
|
|
|
{
|
|
|
|
|
ge::proto::ModelDef model_def;
|
|
|
|
|
auto attrs = model_def.mutable_attr();
|
|
|
|
|
ge::proto::AttrDef *attr_def_soc = &(*attrs)["soc_version"];
|
|
|
|
|
attr_def_soc->set_s("Ascend310");
|
|
|
|
|
ge::proto::AttrDef *attr_def = &(*attrs)["om_info_list"];
|
|
|
|
|
attr_def->mutable_list()->add_i(1);
|
|
|
|
|
attr_def->mutable_list()->add_i(2);
|
|
|
|
|
attr_def->mutable_list()->add_i(3);
|
|
|
|
|
attr_def->mutable_list()->add_i(4);
|
|
|
|
|
attr_def->mutable_list()->add_i(5);
|
|
|
|
|
PrintModelInfo(&model_def);
|
|
|
|
|
}
|
|
|
|
|