| @@ -3501,27 +3501,6 @@ TEST_F(UtestTensorflowParser, tensorflow_Pb2Json_RepeatedMessage2Json_test) | |||||
| delete field; | delete field; | ||||
| } | } | ||||
| TEST_F(UtestTensorflowParser, tensorflow_Pb2Json_OneField2Json_test) | |||||
| { | |||||
| Pb2Json toJson; | |||||
| tensorflow::NodeDef *node_def = initNodeDef(); | |||||
| ProtobufFieldDescriptor *field = new google::protobuf::FieldDescriptor(); | |||||
| ProtobufReflection *reflection = nullptr; | |||||
| set<string> black_fields; | |||||
| black_fields.emplace("offset"); | |||||
| Json json; | |||||
| bool enum2str = true; | |||||
| Message2Operator mess2Op; | |||||
| int depth = 4; | |||||
| ge::OpDescPtr op_desc = std::make_shared<ge::OpDesc>("FusionCustom", "FusionCustom"); | |||||
| ge::Operator ops = ge::OpDescUtils::CreateOperatorFromOpDesc(op_desc); | |||||
| field->CppTypeName(google::protobuf::FieldDescriptor::CPPTYPE_ENUM); | |||||
| mess2Op.ParseField(reflection, node_def, field, depth, ops); | |||||
| toJson.OneField2Json((*node_def), field, reflection, black_fields, json, enum2str); | |||||
| delete field; | |||||
| } | |||||
| TEST_F(UtestTensorflowParser, input_proto_real_path_success) { | TEST_F(UtestTensorflowParser, input_proto_real_path_success) { | ||||
| const char *caffe_proto_path = "./caffe/caffe.proto"; | const char *caffe_proto_path = "./caffe/caffe.proto"; | ||||
| const char *custom_proto_path = "./caffe/custom.proto"; | const char *custom_proto_path = "./caffe/custom.proto"; | ||||