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