Skip to content

Commit

Permalink
Use base::size rather than arraysize in gin/.
Browse files Browse the repository at this point in the history
This is purely a mechanical change; there is no intended behavior change.

BUG=837308
TBR=jbroman@chromium.org

Change-Id: I7e0e6f5f53c038848b9f340f012dd10628e46bb2
Reviewed-on: https://chromium-review.googlesource.com/c/1390728
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618870}
  • Loading branch information
Avi Drissman authored and Commit Bot committed Dec 25, 2018
1 parent f757f81 commit 5069bb2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gin/converter_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <stdint.h>

#include "base/compiler_specific.h"
#include "base/stl_util.h"
#include "gin/handle.h"
#include "gin/public/isolate_holder.h"
#include "gin/test/v8_test.h"
Expand Down Expand Up @@ -65,7 +66,7 @@ TEST_F(ConverterTest, Bool) {
{Undefined(instance_->isolate()).As<Value>(), false},
};

for (size_t i = 0; i < arraysize(test_data); ++i) {
for (size_t i = 0; i < base::size(test_data); ++i) {
bool result = false;
EXPECT_TRUE(Converter<bool>::FromV8(instance_->isolate(),
test_data[i].input, &result));
Expand All @@ -82,7 +83,7 @@ TEST_F(ConverterTest, Int32) {
HandleScope handle_scope(instance_->isolate());

int test_data_to[] = {-1, 0, 1};
for (size_t i = 0; i < arraysize(test_data_to); ++i) {
for (size_t i = 0; i < base::size(test_data_to); ++i) {
EXPECT_TRUE(Converter<int32_t>::ToV8(instance_->isolate(), test_data_to[i])
->StrictEquals(
Integer::New(instance_->isolate(), test_data_to[i])));
Expand Down Expand Up @@ -116,7 +117,7 @@ TEST_F(ConverterTest, Int32) {
{v8::Undefined(instance_->isolate()).As<Value>(), false, 0},
};

for (size_t i = 0; i < arraysize(test_data_from); ++i) {
for (size_t i = 0; i < base::size(test_data_from); ++i) {
int32_t result = std::numeric_limits<int32_t>::min();
bool success = Converter<int32_t>::FromV8(instance_->isolate(),
test_data_from[i].input, &result);
Expand Down

0 comments on commit 5069bb2

Please sign in to comment.