mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 08:53:55 +08:00
Tests that are not specific to openCL or level zero Related-To: NEO-5161 Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
25 lines
489 B
C++
25 lines
489 B
C++
/*
|
|
* Copyright (C) 2018-2021 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "shared/source/helpers/array_count.h"
|
|
|
|
#include "gtest/gtest.h"
|
|
|
|
namespace NEO {
|
|
|
|
TEST(ArrayCountTests, WhenGettingArrayCountThenCorrectCountIsReturned) {
|
|
int a[10];
|
|
EXPECT_EQ(10u, arrayCount(a));
|
|
}
|
|
|
|
TEST(ArrayCountTests, WhenGettingInRangeThenOnlyIndexInRangeReturnsTrue) {
|
|
int a[10];
|
|
EXPECT_TRUE(isInRange(1, a));
|
|
EXPECT_FALSE(isInRange(10, a));
|
|
}
|
|
|
|
} // namespace NEO
|