Functional ULT Coverage for LoadMetricDiscovery

Resolves: LOCI-2164

Signed-off-by: vinod krishna <vinod.krishna@intel.com>
This commit is contained in:
vinod krishna
2021-03-29 20:10:16 +05:30
committed by Compute-Runtime-Automation
parent 4a2a14fd41
commit 9cbfbd1d53

View File

@@ -36,6 +36,22 @@ TEST_F(MetricEnumerationTest, givenIncorrectMetricsDiscoveryDeviceWhenZetGetMetr
EXPECT_EQ(metricGroupCount, 0u);
}
TEST_F(MetricEnumerationTest, givenCorrectMetricDiscoverywhenLoadMetricsDiscoveryIsCalledThenReturnsSuccess) {
EXPECT_CALL(*mockMetricEnumeration, loadMetricsDiscovery())
.Times(1);
EXPECT_EQ(mockMetricEnumeration->loadMetricsDiscovery(), ZE_RESULT_SUCCESS);
}
TEST_F(MetricEnumerationTest, givenIncorrectMetricDiscoverywhenLoadMetricsDiscoveryIsCalledThenReturnsFail) {
mockMetricEnumeration->hMetricsDiscovery = nullptr;
mockMetricEnumeration->openAdapterGroup = nullptr;
EXPECT_EQ(mockMetricEnumeration->baseLoadMetricsDiscovery(), ZE_RESULT_ERROR_NOT_AVAILABLE);
}
TEST_F(MetricEnumerationTest, givenIncorrectMetricsDiscoveryInterfaceVersionWhenZetGetMetricGroupIsCalledThenReturnsFail) {
metricsDeviceParams.Version.MajorNumber = 0;