Skip to content

Commit

Permalink
unittest: Replace ABSL_ARRAYSIZE by ARRAYSIZE
Browse files Browse the repository at this point in the history
Remove the local definition of ABSL_ARRAYSIZE
to avoid a conflict with Abseil.

Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Jan 23, 2019
1 parent 77d0b6c commit a702f2d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions unittest/include_gunit.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ class file : public tesseract::File {
}
};

#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))
Expand Down
2 changes: 1 addition & 1 deletion unittest/stats_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}

Expand Down

0 comments on commit a702f2d

Please sign in to comment.