|
16 | 16 |
|
17 | 17 | namespace ov::test {
|
18 | 18 | using op::v0::Constant, op::v0::Parameter, op::v1::Add, op::v1::ReduceMax, op::v1::StridedSlice, op::v3::ShapeOf;
|
| 19 | +using testing::HasSubstr; |
19 | 20 |
|
20 | 21 | class TypePropSegmentMaxTest : public TypePropOpTest<op::v16::SegmentMax> {};
|
21 | 22 |
|
@@ -69,45 +70,44 @@ TEST_F(TypePropSegmentMaxTest, incorrect_inputs) {
|
69 | 70 | const auto num_segments_f32 = std::make_shared<Parameter>(element::f32, PartialShape{});
|
70 | 71 | OV_EXPECT_THROW(std::ignore = make_op(data, segment_ids, num_segments_f32, op::FillMode::LOWEST),
|
71 | 72 | ov::NodeValidationFailure,
|
72 |
| - testing::HasSubstr("The element type of the num_segments input be i32 or i64.")); |
| 73 | + HasSubstr("The element type of the num_segments input be i32 or i64.")); |
73 | 74 | }
|
74 | 75 | {
|
75 | 76 | const auto segment_ids_f32 = std::make_shared<Parameter>(element::f32, PartialShape{3});
|
76 | 77 | OV_EXPECT_THROW(std::ignore = make_op(data, segment_ids_f32, num_segments, op::FillMode::LOWEST),
|
77 | 78 | ov::NodeValidationFailure,
|
78 |
| - testing::HasSubstr("The element type of the segment_ids input be i32 or i64.")); |
| 79 | + HasSubstr("The element type of the segment_ids input be i32 or i64.")); |
79 | 80 | }
|
80 | 81 | {
|
81 | 82 | const auto segment_ids_nd = std::make_shared<Parameter>(element::i32, PartialShape{2, 3});
|
82 | 83 | OV_EXPECT_THROW(std::ignore = make_op(data, segment_ids_nd, num_segments, op::FillMode::LOWEST),
|
83 | 84 | ov::NodeValidationFailure,
|
84 |
| - testing::HasSubstr("segment_ids must be a 1D input.")); |
| 85 | + HasSubstr("segment_ids must be a 1D input.")); |
85 | 86 | }
|
86 | 87 | {
|
87 | 88 | const auto num_segments_nd = std::make_shared<Parameter>(element::i32, PartialShape{1});
|
88 | 89 | OV_EXPECT_THROW(std::ignore = make_op(data, segment_ids, num_segments_nd, op::FillMode::LOWEST),
|
89 | 90 | ov::NodeValidationFailure,
|
90 |
| - testing::HasSubstr("num_segments must be a scalar input.")); |
| 91 | + HasSubstr("num_segments must be a scalar input.")); |
91 | 92 | }
|
92 | 93 | {
|
93 | 94 | const auto segment_ids_unsorted =
|
94 | 95 | std::make_shared<Constant>(element::i32, Shape{3}, std::vector<int64_t>{1, 0, 1});
|
95 | 96 | OV_EXPECT_THROW(std::ignore = make_op(data, segment_ids_unsorted, num_segments, op::FillMode::LOWEST),
|
96 | 97 | ov::NodeValidationFailure,
|
97 |
| - testing::HasSubstr("segment_ids must be sorted.")); |
| 98 | + HasSubstr("segment_ids must be sorted.")); |
98 | 99 | }
|
99 | 100 | {
|
100 | 101 | const auto data_scalar = std::make_shared<Parameter>(element::i32, PartialShape{});
|
101 | 102 | OV_EXPECT_THROW(std::ignore = make_op(data_scalar, segment_ids, num_segments, op::FillMode::LOWEST),
|
102 | 103 | ov::NodeValidationFailure,
|
103 |
| - testing::HasSubstr("The data input cannot be a scalar.")); |
| 104 | + HasSubstr("The data input cannot be a scalar.")); |
104 | 105 | }
|
105 | 106 | {
|
106 | 107 | const auto segment_ids_short = std::make_shared<Constant>(element::i32, Shape{2}, std::vector<int64_t>{1, 0});
|
107 |
| - OV_EXPECT_THROW( |
108 |
| - std::ignore = make_op(data, segment_ids_short, num_segments, op::FillMode::LOWEST), |
109 |
| - ov::NodeValidationFailure, |
110 |
| - testing::HasSubstr("The number of elements in segment_ids must match the first dimension of data.")); |
| 108 | + OV_EXPECT_THROW(std::ignore = make_op(data, segment_ids_short, num_segments, op::FillMode::LOWEST), |
| 109 | + ov::NodeValidationFailure, |
| 110 | + HasSubstr("The number of elements in segment_ids must match the first dimension of data.")); |
111 | 111 | }
|
112 | 112 | }
|
113 | 113 |
|
|
0 commit comments