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

Side by Side Diff: editor/tools/plugins/com.google.dart.tools.core_test/src/com/google/dart/tools/core/internal/model/testsource/CoreRuntimeTypesTest.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, 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 /** 5 /**
6 * A test of simple runtime behavior on numbers, strings and arrays with 6 * A test of simple runtime behavior on numbers, strings and arrays with
7 * a focus on both correct behavior and runtime errors. 7 * a focus on both correct behavior and runtime errors.
8 * 8 *
9 * This file is written to use minimal type declarations to match a 9 * This file is written to use minimal type declarations to match a
10 * typical dynamic language coding style. 10 * typical dynamic language coding style.
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 assertEquals(y.isEven, false); 140 assertEquals(y.isEven, false);
141 assertEquals(y.isOdd, true); 141 assertEquals(y.isOdd, true);
142 assertEquals(y.toRadixString(2), '1001'); 142 assertEquals(y.toRadixString(2), '1001');
143 assertEquals(y.toRadixString(3), '100'); 143 assertEquals(y.toRadixString(3), '100');
144 assertEquals(y.toRadixString(16), '9'); 144 assertEquals(y.toRadixString(16), '9');
145 } 145 }
146 146
147 static testStringOperators() { 147 static testStringOperators() {
148 var s = "abcdef"; 148 var s = "abcdef";
149 assertEquals(s, "abcdef"); 149 assertEquals(s, "abcdef");
150 assertEquals(s.charCodeAt(0), 97); 150 assertEquals(s.codeUnitAt(0), 97);
151 assertEquals(s[0], 'a'); 151 assertEquals(s[0], 'a');
152 assertEquals(s.length, 6); 152 assertEquals(s.length, 6);
153 assertTypeError(function() { s[null]; }); 153 assertTypeError(function() { s[null]; });
154 assertTypeError(function() { s['hello']; }); 154 assertTypeError(function() { s['hello']; });
155 assertTypeError(function() { s[0] = 'x'; }); 155 assertTypeError(function() { s[0] = 'x'; });
156 } 156 }
157 157
158 // TODO(jimhug): Fill out full set of string methods. 158 // TODO(jimhug): Fill out full set of string methods.
159 static testStringMethods() { 159 static testStringMethods() {
160 var s = "abcdef"; 160 var s = "abcdef";
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 .5.toString(); 266 .5.toString();
267 1.toString(); 267 1.toString();
268 if (false) { 268 if (false) {
269 null.toString(); 269 null.toString();
270 } 270 }
271 '${1}'.toString(); 271 '${1}'.toString();
272 ''.toString(); 272 ''.toString();
273 ''.endsWith(''); 273 ''.endsWith('');
274 } 274 }
275 } 275 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698