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

Side by Side Diff: components/autofill/core/browser/credit_card_unittest.cc

Issue 658993002: Convert ARRAYSIZE_UNSAFE -> arraysize in components/. (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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/guid.h" 6 #include "base/guid.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "components/autofill/core/browser/autofill_test_utils.h" 8 #include "components/autofill/core/browser/autofill_test_utils.h"
9 #include "components/autofill/core/browser/autofill_type.h" 9 #include "components/autofill/core/browser/autofill_type.h"
10 #include "components/autofill/core/browser/credit_card.h" 10 #include "components/autofill/core/browser/credit_card.h"
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 { "68", kGenericCard, false }, 511 { "68", kGenericCard, false },
512 { "69", kGenericCard, false }, 512 { "69", kGenericCard, false },
513 { "7", kGenericCard, false }, 513 { "7", kGenericCard, false },
514 { "8", kGenericCard, false }, 514 { "8", kGenericCard, false },
515 { "9", kGenericCard, false }, 515 { "9", kGenericCard, false },
516 516
517 // Oddball case: Unknown issuer, but valid Luhn check and plausible length. 517 // Oddball case: Unknown issuer, but valid Luhn check and plausible length.
518 { "7000700070007000", kGenericCard, true }, 518 { "7000700070007000", kGenericCard, true },
519 }; 519 };
520 520
521 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_cases); ++i) { 521 for (size_t i = 0; i < arraysize(test_cases); ++i) {
522 base::string16 card_number = ASCIIToUTF16(test_cases[i].card_number); 522 base::string16 card_number = ASCIIToUTF16(test_cases[i].card_number);
523 SCOPED_TRACE(card_number); 523 SCOPED_TRACE(card_number);
524 EXPECT_EQ(test_cases[i].type, CreditCard::GetCreditCardType(card_number)); 524 EXPECT_EQ(test_cases[i].type, CreditCard::GetCreditCardType(card_number));
525 EXPECT_EQ(test_cases[i].is_valid, IsValidCreditCardNumber(card_number)); 525 EXPECT_EQ(test_cases[i].is_valid, IsValidCreditCardNumber(card_number));
526 } 526 }
527 } 527 }
528 528
529 } // namespace autofill 529 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698