diff --git a/src/frontends/onnx/tests/models/reduce_wrong_type_v2.prototxt b/src/frontends/onnx/tests/models/reduce_wrong_type_v2.prototxt new file mode 100644 index 00000000000000..dbe50364fbe5f7 --- /dev/null +++ b/src/frontends/onnx/tests/models/reduce_wrong_type_v2.prototxt @@ -0,0 +1,48 @@ +ir_version: 3 +producer_name: "OpenVINO ONNX Frontend" +graph { + node { + input: "A" + output: "B" + op_type: "ReduceSum" + } + name: "compute_graph" + input { + name: "A" + type { + tensor_type { + elem_type: 3 + shape { + dim { + dim_value: 1 + } + dim { + dim_value: 1 + } + dim { + dim_value: 4 + } + dim { + dim_value: 4 + } + } + } + } + } + output { + name: "B" + type { + tensor_type { + elem_type: 3 + shape { + dim { + dim_value: 1 + } + } + } + } + } +} +opset_import { + version: 13 +} diff --git a/src/frontends/onnx/tests/onnx_import_exceptions.cpp b/src/frontends/onnx/tests/onnx_import_exceptions.cpp index 70249d28861ccd..ad36de295478d3 100644 --- a/src/frontends/onnx/tests/onnx_import_exceptions.cpp +++ b/src/frontends/onnx/tests/onnx_import_exceptions.cpp @@ -59,19 +59,35 @@ TEST(onnx_importer, exception_msg_std_err_wrapped) { } } - TEST(onnx_importer, exception_msg_onnx_reduce_wrong_type_v1) { try { convert_model("reduce_wrong_type_v1.onnx"); // Should have thrown, so fail if it didn't FAIL() << "ONNX Importer did not detected incorrect model!"; } catch (const ::ov::Exception& e) { - EXPECT_HAS_SUBSTRING(e.what(), std::string("While validating ONNX node '