mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-20 13:11:34 +08:00

Related-To: NEO-2236 Change-Id: Id17f8d41b5bd26df6a101d4fa4214347106c7d0d Signed-off-by: Adam Cetnerowski <adam.cetnerowski@intel.com>
25 lines
489 B
C++
25 lines
489 B
C++
/*
|
|
* Copyright (C) 2017-2020 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
|