Modify makro HWTEST2_F and HWTEST2_P

to not call SetUp and TearDown when not matched

Change-Id: I00b43a738fa3b33ba743f4f92f8ee16674bf9a50
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
This commit is contained in:
Katarzyna Cencelewska
2020-05-22 14:38:08 +02:00
parent d6fb463f16
commit f4759425b9
15 changed files with 129 additions and 12 deletions

View File

@@ -78,7 +78,7 @@ target_include_directories(${TARGET_NAME}
$<TARGET_PROPERTY:${TARGET_NAME_L0},SOURCE_DIR>/tools
$<TARGET_PROPERTY:${TARGET_NAME_L0},SOURCE_DIR>/../../../../instrumentation/inc/common/instrumentation/api/
$<TARGET_PROPERTY:${TARGET_NAME_L0},SOURCE_DIR>/core/os_interface
${NEO_SHARED_TEST_DIRECTORY}/unit_test/test_macros${BRANCH_DIR_SUFFIX}
${NEO_SHARED_TEST_DIRECTORY}/unit_test/test_macros/header${BRANCH_DIR_SUFFIX}
)
if (UNIX)

View File

@@ -113,6 +113,7 @@ HWTEST2_F(ImageCreate, givenValidImageDescriptionWhenImageCreateThenImageIsCreat
}
class TestImageFormats : public DeviceFixture, public testing::TestWithParam<std::pair<ze_image_format_layout_t, ze_image_format_type_t>> {
public:
void SetUp() override {
DeviceFixture::SetUp();
}

View File

@@ -37,7 +37,15 @@ class SamplerCreateTest
: public Test<DeviceFixture>,
public ::testing::WithParamInterface<std::tuple<ze_sampler_address_mode_t,
ze_sampler_filter_mode_t,
ze_bool_t>> {};
ze_bool_t>> {
public:
void SetUp() {
Test<DeviceFixture>::SetUp();
}
void TearDown() {
Test<DeviceFixture>::TearDown();
}
};
HWTEST2_P(SamplerCreateTest, givenDifferentDescriptorValuesThenSamplerIsCorrectlyCreated, SamplerCreateSupport) {
using SAMPLER_STATE = typename FamilyType::SAMPLER_STATE;