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

Side by Side Diff: ios/chrome/common/string_util_unittest.mm

Issue 2681353002: [ObjC ARC] Converts ios/chrome/common:unit_tests to ARC. (Closed)
Patch Set: comments 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/common/ns_regular_expression_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 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 "ios/chrome/common/string_util.h" 5 #include "ios/chrome/common/string_util.h"
6 6
7 #import <UIKit/UIKit.h> 7 #import <UIKit/UIKit.h>
8 8
9 #include "base/mac/scoped_nsobject.h"
10 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
11 #include "testing/gtest_mac.h" 10 #include "testing/gtest_mac.h"
12 #include "testing/platform_test.h" 11 #include "testing/platform_test.h"
13 12
13 #if !defined(__has_feature) || !__has_feature(objc_arc)
14 #error "This file requires ARC support."
15 #endif
16
14 namespace { 17 namespace {
15 18
16 TEST(StringUtilTest, ParseStringWithLink) { 19 TEST(StringUtilTest, ParseStringWithLink) {
17 NSArray* const all_test_data = @[ 20 NSArray* const all_test_data = @[
18 @{ 21 @{
19 @"input" : @"Text without link.", 22 @"input" : @"Text without link.",
20 @"expected" : @"Text without link.", 23 @"expected" : @"Text without link.",
21 @"link range" : [NSValue valueWithRange:NSMakeRange(NSNotFound, 0)] 24 @"link range" : [NSValue valueWithRange:NSMakeRange(NSNotFound, 0)]
22 }, 25 },
23 @{ 26 @{
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 122
120 NSString* leading_calculated = 123 NSString* leading_calculated =
121 SubstringOfWidth(long_string, attributes, leading_width, NO); 124 SubstringOfWidth(long_string, attributes, leading_width, NO);
122 EXPECT_NSEQ(leading, leading_calculated); 125 EXPECT_NSEQ(leading, leading_calculated);
123 126
124 NSString* trailing_calculated = 127 NSString* trailing_calculated =
125 SubstringOfWidth(long_string, attributes, trailing_width, YES); 128 SubstringOfWidth(long_string, attributes, trailing_width, YES);
126 EXPECT_NSEQ(trailing, trailing_calculated); 129 EXPECT_NSEQ(trailing, trailing_calculated);
127 } 130 }
128 } // namespace 131 } // namespace
OLDNEW
« no previous file with comments | « ios/chrome/common/ns_regular_expression_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698