Debian Codegraph @

shared/test/unit_test/gen12lp/dg1/hw_info_tests_dg1.cpp

raw
1 /*
2 * Copyright (C) 2020-2024 Intel Corporation
3 *
4 * SPDX-License-Identifier: MIT
5 *
6 */
7
8 #include "shared/source/helpers/hw_info.h"
9 #include "shared/test/common/helpers/debug_manager_state_restore.h"
10 #include "shared/test/common/helpers/default_hw_info.h"
11 #include "shared/test/common/helpers/gtest_helpers.h"
12 #include "shared/test/common/test_macros/hw_test.h"
13
14 using namespace NEO;
15
16 template <typename T>
17 class Dg1HwInfoTests : public ::testing::Test {};
18 typedef ::testing::Types<Dg1HwConfig> dg1TestTypes;
19 TYPED_TEST_SUITE(Dg1HwInfoTests, dg1TestTypes);
20
21 TYPED_TEST(Dg1HwInfoTests, WhenSetupHardwareInfoWithSetupFeatureTableFlagTrueOrFalseIsCalledThenFeatureTableHasCorrectValueOfLocalMemoryFeature) {
22 HardwareInfo hwInfo = *defaultHwInfo;
23 FeatureTable &featureTable = hwInfo.featureTable;
24
25 EXPECT_FALSE(featureTable.flags.ftrLocalMemory);
26 TypeParam::setupHardwareInfo(&hwInfo, false, nullptr);
27 EXPECT_FALSE(featureTable.flags.ftrLocalMemory);
28 TypeParam::setupHardwareInfo(&hwInfo, true, nullptr);
29 EXPECT_TRUE(featureTable.flags.ftrLocalMemory);
30 }