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

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

Issue 17759007: First pass at asynchronous input loading in dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments Created 7 years, 3 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 import "package:async_helper/async_helper.dart";
6 import 'compiler_helper.dart'; 7 import 'compiler_helper.dart';
7 8
8 const String TEST1 = r""" 9 const String TEST1 = r"""
9 var a = [42]; 10 var a = [42];
10 main() { 11 main() {
11 return a[0]; 12 return a[0];
12 } 13 }
13 """; 14 """;
14 15
15 String TEST2(selectorName, args) { 16 String TEST2(selectorName, args) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 doIt(a) { 57 doIt(a) {
57 a.clear(); 58 a.clear();
58 foo(a); 59 foo(a);
59 } 60 }
60 main() { 61 main() {
61 foo(null); 62 foo(null);
62 } 63 }
63 """; 64 """;
64 65
65 void checkRangeError(String test, {bool hasRangeError}) { 66 void checkRangeError(String test, {bool hasRangeError}) {
66 String generated = compileAll(test); 67 asyncTest(() => compileAll(test).then((generated) {
67 Expect.equals(hasRangeError, generated.contains('ioore')); 68 Expect.equals(hasRangeError, generated.contains('ioore'));
69 }));
68 } 70 }
69 71
70 main() { 72 main() {
71 checkRangeError(TEST1, hasRangeError: false); 73 checkRangeError(TEST1, hasRangeError: false);
72 checkRangeError(TEST2('insert', 'null, null'), hasRangeError: true); 74 checkRangeError(TEST2('insert', 'null, null'), hasRangeError: true);
73 checkRangeError(TEST2('add', 'null'), hasRangeError: true); 75 checkRangeError(TEST2('add', 'null'), hasRangeError: true);
74 checkRangeError(TEST2('clear', ''), hasRangeError: true); 76 checkRangeError(TEST2('clear', ''), hasRangeError: true);
75 checkRangeError(TEST2('toString', ''), hasRangeError: false); 77 checkRangeError(TEST2('toString', ''), hasRangeError: false);
76 checkRangeError(TEST3, hasRangeError: false); 78 checkRangeError(TEST3, hasRangeError: false);
77 checkRangeError(TEST4, hasRangeError: true); 79 checkRangeError(TEST4, hasRangeError: true);
78 checkRangeError(TEST5, hasRangeError: true); 80 checkRangeError(TEST5, hasRangeError: true);
79 checkRangeError(TEST6, hasRangeError: true); 81 checkRangeError(TEST6, hasRangeError: true);
80 } 82 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/list_tracer2_test.dart ('k') | tests/compiler/dart2js/list_tracer_node_type_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698