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

Side by Side Diff: tests/language/adjacent_string_literals_test.dart

Issue 10981026: Convert raw strings to new syntax (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 main() { 5 main() {
6 testEmpty(); 6 testEmpty();
7 testInterpolation(); 7 testInterpolation();
8 testMultiline(); 8 testMultiline();
9 } 9 }
10 10
11 testEmpty() { 11 testEmpty() {
12 Expect.equals("", "" "" ""); 12 Expect.equals("", "" "" "");
13 Expect.equals("", "" '' ""); 13 Expect.equals("", "" '' "");
14 Expect.equals("", "" "" @""); 14 Expect.equals("", "" "" r"");
15 15
16 Expect.equals("a", "a" ""); 16 Expect.equals("a", "a" "");
17 Expect.equals("a", "a" ''); 17 Expect.equals("a", "a" '');
18 Expect.equals("a", "a" @''); 18 Expect.equals("a", "a" r'');
19 19
20 Expect.equals("b", 'b' ""); 20 Expect.equals("b", 'b' "");
21 Expect.equals("b", 'b' ''); 21 Expect.equals("b", 'b' '');
22 Expect.equals("b", 'b' @''); 22 Expect.equals("b", 'b' r'');
23 23
24 Expect.equals("c", @'c' ""); 24 Expect.equals("c", r'c' "");
25 Expect.equals("c", @'c' ''); 25 Expect.equals("c", r'c' '');
26 Expect.equals("c", @'c' @''); 26 Expect.equals("c", r'c' r'');
27 27
28 Expect.equals("a", "" "a"); 28 Expect.equals("a", "" "a");
29 Expect.equals("a", "" 'a'); 29 Expect.equals("a", "" 'a');
30 Expect.equals("a", "" @'a'); 30 Expect.equals("a", "" r'a');
31 31
32 Expect.equals("b", '' "b"); 32 Expect.equals("b", '' "b");
33 Expect.equals("b", '' 'b'); 33 Expect.equals("b", '' 'b');
34 Expect.equals("b", '' @'b'); 34 Expect.equals("b", '' r'b');
35 35
36 Expect.equals("c", @'' "c"); 36 Expect.equals("c", r'' "c");
37 Expect.equals("c", @'' 'c'); 37 Expect.equals("c", r'' 'c');
38 Expect.equals("c", @'' @'c'); 38 Expect.equals("c", r'' r'c');
39 } 39 }
40 40
41 testInterpolation() { 41 testInterpolation() {
42 var s = "a"; 42 var s = "a";
43 Expect.equals(@"ab", "$s" "b"); 43 Expect.equals(r"ab", "$s" "b");
44 Expect.equals(@"ab", '$s' "b"); 44 Expect.equals(r"ab", '$s' "b");
45 Expect.equals(@"$sb", @'$s' "b"); 45 Expect.equals(r"$sb", r'$s' "b");
46 46
47 Expect.equals(@"-a-b", "-$s-" "b"); 47 Expect.equals(r"-a-b", "-$s-" "b");
48 Expect.equals(@"-a-b", '-$s-' "b"); 48 Expect.equals(r"-a-b", '-$s-' "b");
49 Expect.equals(@"-$s-b", @'-$s-' "b"); 49 Expect.equals(r"-$s-b", r'-$s-' "b");
50
51 Expect.equals(@"ba", 'b' "$s");
52 Expect.equals(@"ba", 'b' '$s');
53 Expect.equals(@"b$s", 'b' @'$s');
54 50
55 Expect.equals(@"b-a-", 'b' "-$s-"); 51 Expect.equals(r"ba", 'b' "$s");
56 Expect.equals(@"b-a-", 'b' '-$s-'); 52 Expect.equals(r"ba", 'b' '$s');
57 Expect.equals(@"b-$s-", 'b' @'-$s-'); 53 Expect.equals(r"b$s", 'b' r'$s');
54
55 Expect.equals(r"b-a-", 'b' "-$s-");
56 Expect.equals(r"b-a-", 'b' '-$s-');
57 Expect.equals(r"b-$s-", 'b' r'-$s-');
58 } 58 }
59 59
60 testMultiline() { 60 testMultiline() {
61 Expect.equals("abe", 61 Expect.equals("abe",
62 "a" 62 "a"
63 "b" 63 "b"
64 "e"); 64 "e");
65 Expect.equals("a b e", 65 Expect.equals("a b e",
66 "a " 66 "a "
67 "b " 67 "b "
68 "e"); 68 "e");
69 Expect.equals("a b e", 69 Expect.equals("a b e",
70 "a" 70 "a"
71 " b" 71 " b"
72 " e"); 72 " e");
73 73
74 Expect.equals("abe", """ 74 Expect.equals("abe", """
75 a""" "b" "e"); 75 a""" "b" "e");
76 Expect.equals("a b e", """ 76 Expect.equals("a b e", """
77 a""" " b" " e"); 77 a""" " b" " e");
78 78
79 Expect.equals("abe", """ 79 Expect.equals("abe", """
80 a""" """ 80 a""" """
81 b""" """ 81 b""" """
82 e"""); 82 e""");
83 } 83 }
84 84
OLDNEW
« no previous file with comments | « tests/language/adjacent_const_string_literals_test.dart ('k') | tests/language/field_method4_negative_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698