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

Side by Side Diff: tests/compiler/dart2js_foreign/native_class_inheritance3_test.dart

Issue 12743005: Revert "Remove Expect from core library." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload (first upload failed). Created 7 years, 9 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 // Test to see if resolving a hidden native class's method to noSuchMethod 5 // Test to see if resolving a hidden native class's method to noSuchMethod
6 // interferes with subsequent resolving of the method. This might happen if the 6 // interferes with subsequent resolving of the method. This might happen if the
7 // noSuchMethod is cached on Object.prototype. 7 // noSuchMethod is cached on Object.prototype.
8 8
9 import "package:expect/expect.dart";
10 import 'native_metadata.dart'; 9 import 'native_metadata.dart';
11 10
12 @Native("*A1") 11 @Native("*A1")
13 class A1 { 12 class A1 {
14 } 13 }
15 14
16 @Native("*B1") 15 @Native("*B1")
17 class B1 extends A1 { 16 class B1 extends A1 {
18 } 17 }
19 18
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 expectNoSuchMethod(action, note) { 95 expectNoSuchMethod(action, note) {
97 bool caught = false; 96 bool caught = false;
98 try { 97 try {
99 action(); 98 action();
100 } catch (ex) { 99 } catch (ex) {
101 caught = true; 100 caught = true;
102 Expect.isTrue(ex is NoSuchMethodError, note); 101 Expect.isTrue(ex is NoSuchMethodError, note);
103 } 102 }
104 Expect.isTrue(caught, note); 103 Expect.isTrue(caught, note);
105 } 104 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698