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

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: Remove withCurrentElementAsync Created 7 years, 4 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 'compiler_helper.dart'; 6 import 'compiler_helper.dart';
7 7
8 const String TEST1 = r""" 8 const String TEST1 = r"""
9 var a = [42]; 9 var a = [42];
10 main() { 10 main() {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 doIt(a) { 56 doIt(a) {
57 a.clear(); 57 a.clear();
58 foo(a); 58 foo(a);
59 } 59 }
60 main() { 60 main() {
61 foo(null); 61 foo(null);
62 } 62 }
63 """; 63 """;
64 64
65 void checkRangeError(String test, {bool hasRangeError}) { 65 void checkRangeError(String test, {bool hasRangeError}) {
66 String generated = compileAll(test); 66 compileAll(test).then((generated) {
67 Expect.equals(hasRangeError, generated.contains('ioore')); 67 Expect.equals(hasRangeError, generated.contains('ioore'));
68 });
68 } 69 }
69 70
70 main() { 71 main() {
71 checkRangeError(TEST1, hasRangeError: false); 72 checkRangeError(TEST1, hasRangeError: false);
72 checkRangeError(TEST2('insert', 'null, null'), hasRangeError: true); 73 checkRangeError(TEST2('insert', 'null, null'), hasRangeError: true);
73 checkRangeError(TEST2('add', 'null'), hasRangeError: true); 74 checkRangeError(TEST2('add', 'null'), hasRangeError: true);
74 checkRangeError(TEST2('clear', ''), hasRangeError: true); 75 checkRangeError(TEST2('clear', ''), hasRangeError: true);
75 checkRangeError(TEST2('toString', ''), hasRangeError: false); 76 checkRangeError(TEST2('toString', ''), hasRangeError: false);
76 checkRangeError(TEST3, hasRangeError: false); 77 checkRangeError(TEST3, hasRangeError: false);
77 checkRangeError(TEST4, hasRangeError: true); 78 checkRangeError(TEST4, hasRangeError: true);
78 checkRangeError(TEST5, hasRangeError: true); 79 checkRangeError(TEST5, hasRangeError: true);
79 checkRangeError(TEST6, hasRangeError: true); 80 checkRangeError(TEST6, hasRangeError: true);
80 } 81 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698