Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Unified Diff: gin/converter_unittest.cc

Issue 663673002: Convert the few remaining ARRAYSIZE_UNSAFE -> arraysize. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/hid/hid_report_descriptor_unittest.cc ('k') | google_apis/drive/drive_api_url_generator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/converter_unittest.cc
diff --git a/gin/converter_unittest.cc b/gin/converter_unittest.cc
index 791d7e66ec5bb05278b8425621c53cd6515253b1..f8011d684eec09941c788029b4e430d0a75b655e 100644
--- a/gin/converter_unittest.cc
+++ b/gin/converter_unittest.cc
@@ -55,7 +55,7 @@ TEST_F(ConverterTest, Bool) {
{ Undefined(instance_->isolate()).As<Value>(), false },
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_data); ++i) {
+ for (size_t i = 0; i < arraysize(test_data); ++i) {
bool result = false;
EXPECT_TRUE(Converter<bool>::FromV8(instance_->isolate(),
test_data[i].input, &result));
@@ -72,7 +72,7 @@ TEST_F(ConverterTest, Int32) {
HandleScope handle_scope(instance_->isolate());
int test_data_to[] = {-1, 0, 1};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_data_to); ++i) {
+ for (size_t i = 0; i < arraysize(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])));
@@ -98,7 +98,7 @@ TEST_F(ConverterTest, Int32) {
{ v8::Undefined(instance_->isolate()).As<Value>(), false, 0 },
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_data_from); ++i) {
+ for (size_t i = 0; i < arraysize(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);
« no previous file with comments | « device/hid/hid_report_descriptor_unittest.cc ('k') | google_apis/drive/drive_api_url_generator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698