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

Side by Side Diff: tests/language/megamorphic_no_such_method_test.dart

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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) 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 // Test program for correct optimizations related to types fo allocated lists. 4 // Test program for correct optimizations related to types fo allocated lists.
5 5
6 import "package:expect/expect.dart";
7
6 // Classes to induce polymorphism of degree 10. 8 // Classes to induce polymorphism of degree 10.
7 class A0 { 9 class A0 {
8 test() => 0; 10 test() => 0;
9 } 11 }
10 12
11 class A1 { 13 class A1 {
12 test() => 1; 14 test() => 1;
13 } 15 }
14 16
15 class A2 { 17 class A2 {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // Trigger optimization of 'test' function. 57 // Trigger optimization of 'test' function.
56 List list = [new A0(), new A1(), new A2(), new A3(), new A4(), 58 List list = [new A0(), new A1(), new A2(), new A3(), new A4(),
57 new A5(), new A6(), new A7(), new A8(), new A9()]; 59 new A5(), new A6(), new A7(), new A8(), new A9()];
58 for (int i = 0; i < 1000; i++) { 60 for (int i = 0; i < 1000; i++) {
59 for (var obj in list) { 61 for (var obj in list) {
60 test(obj); 62 test(obj);
61 } 63 }
62 } 64 }
63 Expect.throws(() => test(new B()), (e) => e is NoSuchMethodError); 65 Expect.throws(() => test(new B()), (e) => e is NoSuchMethodError);
64 } 66 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698