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

Side by Side Diff: ios/chrome/browser/ui/tab_switcher/tab_switcher_utils_unittest.mm

Issue 2689553002: [ObjC ARC] Converts ios/chrome/browser/ui/tab_switcher:unit_tests to ARC. (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « ios/chrome/browser/ui/tab_switcher/tab_switcher_model_unittest.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ios/chrome/browser/ui/tab_switcher/tab_switcher_utils.h" 5 #include "ios/chrome/browser/ui/tab_switcher/tab_switcher_utils.h"
6 6
7 #include "testing/platform_test.h" 7 #include "testing/platform_test.h"
8 8
9 #if !defined(__has_feature) || !__has_feature(objc_arc)
10 #error "This file requires ARC support."
11 #endif
12
9 class TabSwitcherUtilsTest : public PlatformTest { 13 class TabSwitcherUtilsTest : public PlatformTest {
10 protected: 14 protected:
11 // Checks that the computed updates/deletions/insertions to go from |initial| 15 // Checks that the computed updates/deletions/insertions to go from |initial|
12 // to |final| correctly match the expected updates/deletions/insertions. 16 // to |final| correctly match the expected updates/deletions/insertions.
13 void TestLevenshtein(std::vector<size_t> const& initial, 17 void TestLevenshtein(std::vector<size_t> const& initial,
14 std::vector<size_t> const& final, 18 std::vector<size_t> const& final,
15 std::vector<size_t> const& expectedSubstitutions, 19 std::vector<size_t> const& expectedSubstitutions,
16 std::vector<size_t> const& expectedDeletions, 20 std::vector<size_t> const& expectedDeletions,
17 std::vector<size_t> const& expectedInsertions) { 21 std::vector<size_t> const& expectedInsertions) {
18 std::vector<size_t> substitutions; 22 std::vector<size_t> substitutions;
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 TEST_F(TabSwitcherUtilsTest, 121 TEST_F(TabSwitcherUtilsTest,
118 TestLevenshteinPreferInsertionsAndDeletionsOverSubstitutions) { 122 TestLevenshteinPreferInsertionsAndDeletionsOverSubstitutions) {
119 std::vector<size_t> initial = {0, 1}; 123 std::vector<size_t> initial = {0, 1};
120 std::vector<size_t> final = {1, 2}; 124 std::vector<size_t> final = {1, 2};
121 std::vector<size_t> expectedSubstitutions = {}; 125 std::vector<size_t> expectedSubstitutions = {};
122 std::vector<size_t> expectedDeletions = {0}; 126 std::vector<size_t> expectedDeletions = {0};
123 std::vector<size_t> expectedInsertions = {1}; 127 std::vector<size_t> expectedInsertions = {1};
124 TestLevenshtein(initial, final, expectedSubstitutions, expectedDeletions, 128 TestLevenshtein(initial, final, expectedSubstitutions, expectedDeletions,
125 expectedInsertions); 129 expectedInsertions);
126 } 130 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/tab_switcher/tab_switcher_model_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698