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

Side by Side Diff: dart/tests/compiler/dart2js/value_range_test.dart

Issue 11788016: Update dart2js unit tests to new library API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: No need to implement Iterable Created 7 years, 11 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 import 'compiler_helper.dart'; 5 import 'compiler_helper.dart';
6 6
7 const int REMOVED = 0; 7 const int REMOVED = 0;
8 const int ABOVE_ZERO = 1; 8 const int ABOVE_ZERO = 1;
9 const int BELOW_LENGTH = 2; 9 const int BELOW_LENGTH = 2;
10 const int KEPT = 3; 10 const int KEPT = 3;
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 const String DEFAULT_CORELIB_WITH_LIST_INTERFACE = r''' 204 const String DEFAULT_CORELIB_WITH_LIST_INTERFACE = r'''
205 print(var obj) {} 205 print(var obj) {}
206 abstract class num {} 206 abstract class num {}
207 abstract class int extends num { } 207 abstract class int extends num { }
208 abstract class double extends num { } 208 abstract class double extends num { }
209 class bool {} 209 class bool {}
210 class String {} 210 class String {}
211 class Object {} 211 class Object {}
212 class Type {} 212 class Type {}
213 class Function {} 213 class Function {}
214 class List { List([length]); } 214 class List {
215 List();
216 List.fixedLength(length);
217 }
215 abstract class Map {} 218 abstract class Map {}
216 class Closure {} 219 class Closure {}
217 class Null {} 220 class Null {}
218 class Dynamic_ {} 221 class Dynamic_ {}
219 bool identical(Object a, Object b) {}'''; 222 bool identical(Object a, Object b) {}''';
220 223
221 expect(String code, int kind) { 224 expect(String code, int kind) {
222 String generated = 225 String generated =
223 compile(code, coreSource: DEFAULT_CORELIB_WITH_LIST_INTERFACE); 226 compile(code, coreSource: DEFAULT_CORELIB_WITH_LIST_INTERFACE);
224 switch (kind) { 227 switch (kind) {
(...skipping 29 matching lines...) Expand all
254 break; 257 break;
255 } 258 }
256 } 259 }
257 260
258 261
259 main() { 262 main() {
260 for (int i = 0; i < TESTS.length; i += 2) { 263 for (int i = 0; i < TESTS.length; i += 2) {
261 expect(TESTS[i], TESTS[i + 1]); 264 expect(TESTS[i], TESTS[i + 1]);
262 } 265 }
263 } 266 }
OLDNEW
« no previous file with comments | « dart/tests/compiler/dart2js/resolver_test.dart ('k') | dart/tests/utils/dummy_compiler_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698