From 642b72cd91dc2af3eee5b684b5d1e8c7165fc2a5 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Tue, 24 Feb 2015 09:52:16 -0800 Subject: [PATCH] Fix StringRef test --- test/util-test.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/util-test.cc b/test/util-test.cc index 59dfddff..17936576 100644 --- a/test/util-test.cc +++ b/test/util-test.cc @@ -700,10 +700,9 @@ void test_count_digits() { TEST(UtilTest, StringRef) { // Test that StringRef::size() returns string length, not buffer size. - enum {BUFFER_SIZE = 100}; - char str[BUFFER_SIZE] = "some string"; + char str[100] = "some string"; EXPECT_EQ(std::strlen(str), StringRef(str).size()); - EXPECT_LT(std::strlen(str), BUFFER_SIZE); + EXPECT_LT(std::strlen(str), sizeof(str)); } TEST(UtilTest, CountDigits) {