Skip to content

Commit

Permalink
[Tmpl test] Maximum: enable whole Tensor comparison (#23996)
Browse files Browse the repository at this point in the history
### Details:
 - Used actual shape in expected output tensor.

### Tickets:
 - CVS-137184
  • Loading branch information
t-jankowski authored Apr 12, 2024
1 parent e473a6b commit 14b65c8
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/plugins/template/tests/functional/op_reference/maximum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ struct MaximumParams {
pshape2(iShape2),
inType(iType),
outType(iType),
inputData1(CreateTensor(iType, iValues1)),
inputData2(CreateTensor(iType, iValues2)),
refData(CreateTensor(iType, oValues)) {}
inputData1(CreateTensor(iShape1.get_shape(), iType, iValues1)),
inputData2(CreateTensor(iShape2.get_shape(), iType, iValues2)),
refData(CreateTensor(iShape1.get_shape(), iType, oValues)) {}

PartialShape pshape1;
PartialShape pshape2;
Expand All @@ -41,15 +41,14 @@ struct MaximumParams {
class ReferenceMaximumLayerTest : public testing::TestWithParam<MaximumParams>, public CommonReferenceTest {
public:
void SetUp() override {
legacy_compare = true;
auto params = GetParam();
const auto& params = GetParam();
function = CreateFunction(params.pshape1, params.pshape2, params.inType, params.outType);
inputData = {params.inputData1, params.inputData2};
refOutData = {params.refData};
}

static std::string getTestCaseName(const testing::TestParamInfo<MaximumParams>& obj) {
auto param = obj.param;
const auto& param = obj.param;
std::ostringstream result;
result << "iShape1=" << param.pshape1 << "_";
result << "iShape2=" << param.pshape2 << "_";
Expand Down Expand Up @@ -188,12 +187,12 @@ INSTANTIATE_TEST_SUITE_P(smoke_Maximum_Int32_With_Hardcoded_Refs,
::testing::ValuesIn(generateCombinedParamsForMaximumInt32()),
ReferenceMaximumLayerTest::getTestCaseName);

INSTANTIATE_TEST_SUITE_P(smoke_Maximume_Int64_With_Hardcoded_Refs,
INSTANTIATE_TEST_SUITE_P(smoke_Maximum_Int64_With_Hardcoded_Refs,
ReferenceMaximumLayerTest,
::testing::ValuesIn(generateCombinedParamsForMaximumInt64()),
ReferenceMaximumLayerTest::getTestCaseName);

INSTANTIATE_TEST_SUITE_P(smoke_Maximume_UnsignedInt_With_Hardcoded_Refs,
INSTANTIATE_TEST_SUITE_P(smoke_Maximum_UnsignedInt_With_Hardcoded_Refs,
ReferenceMaximumLayerTest,
::testing::ValuesIn(generateCombinedParamsForMaximumUnsignedInt()),
ReferenceMaximumLayerTest::getTestCaseName);
Expand Down

0 comments on commit 14b65c8

Please sign in to comment.