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

Side by Side Diff: tests/corelib/string_base_vm_test.dart

Issue 12282038: Remove deprecated string features. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head Created 7 years, 9 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
« no previous file with comments | « tests/corelib/json_test.dart ('k') | tests/corelib/string_character_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Dart test program for testing class 'StringBase' (currently VM specific). 4 // Dart test program for testing class 'StringBase' (currently VM specific).
5 5
6 library string_base_test; 6 library string_base_test;
7 7
8 class StringBaseTest { 8 class StringBaseTest {
9 9
10 StringBaseTest() {} 10 StringBaseTest() {}
(...skipping 12 matching lines...) Expand all
23 s = "${numBottles*3} bottles of beer on the $wall."; 23 s = "${numBottles*3} bottles of beer on the $wall.";
24 Expect.equals("99 bottles of beer on the wall.", s); 24 Expect.equals("99 bottles of beer on the wall.", s);
25 } 25 }
26 26
27 static testCreation() { 27 static testCreation() {
28 String s = "Hello"; 28 String s = "Hello";
29 List<int> a = new List.fixedLength(s.length); 29 List<int> a = new List.fixedLength(s.length);
30 List<int> ga = new List(); 30 List<int> ga = new List();
31 bool exception_caught = false; 31 bool exception_caught = false;
32 for (int i = 0; i < a.length; i++) { 32 for (int i = 0; i < a.length; i++) {
33 a[i] = s.charCodeAt(i); 33 a[i] = s.codeUnitAt(i);
34 ga.add(s.charCodeAt(i)); 34 ga.add(s.codeUnitAt(i));
35 } 35 }
36 try { 36 try {
37 String s4 = new String.fromCharCodes([0.0]); 37 String s4 = new String.fromCharCodes([0.0]);
38 } on ArgumentError catch (ex) { 38 } on ArgumentError catch (ex) {
39 exception_caught = true; 39 exception_caught = true;
40 } 40 }
41 Expect.equals(true, exception_caught); 41 Expect.equals(true, exception_caught);
42 exception_caught = false; 42 exception_caught = false;
43 try { 43 try {
44 String s4 = new String.fromCharCodes([-1]); 44 String s4 = new String.fromCharCodes([-1]);
(...skipping 26 matching lines...) Expand all
71 static void testMain() { 71 static void testMain() {
72 testInterpolation(); 72 testInterpolation();
73 testCreation(); 73 testCreation();
74 testSubstring(); 74 testSubstring();
75 } 75 }
76 } 76 }
77 77
78 main() { 78 main() {
79 StringBaseTest.testMain(); 79 StringBaseTest.testMain();
80 } 80 }
OLDNEW
« no previous file with comments | « tests/corelib/json_test.dart ('k') | tests/corelib/string_character_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698