unittest: Replace ABSL_ARRAYSIZE by ARRAYSIZE

Remove the local definition of ABSL_ARRAYSIZE
to avoid a conflict with Abseil.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2019-01-21 21:31:30 +01:00
parent 77d0b6ce8e
commit a702f2d2aa
2 changed files with 1 additions and 4 deletions

View File

@ -50,9 +50,6 @@ public:
}
};
#if !defined(ABSL_ARRAYSIZE)
#define ABSL_ARRAYSIZE(arr) (sizeof(arr) / sizeof(arr[0]))
#endif
#define ARRAYSIZE(arr) (sizeof(arr) / sizeof(arr[0]))
#define CHECK(test) ASSERT_HOST(test)
#define CHECK_GT(test, value) ASSERT_HOST((test) > (value))

View File

@ -23,7 +23,7 @@ class STATSTest : public testing::Test {
public:
void SetUp() {
stats_.set_range(0, 16);
for (int i = 0; i < ABSL_ARRAYSIZE(kTestData); ++i)
for (int i = 0; i < ARRAYSIZE(kTestData); ++i)
stats_.add(i, kTestData[i]);
}