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

Side by Side Diff: tests/compiler/dart2js_native/native_class_inheritance1_frog_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 import "package:expect/expect.dart";
6
7 // Test to see if resolving a hidden native class's method interferes with 5 // Test to see if resolving a hidden native class's method interferes with
8 // subsequent resolving the subclass's method. This might happen if the 6 // subsequent resolving the subclass's method. This might happen if the
9 // superclass caches the method in the prototype, so shadowing the dispatcher 7 // superclass caches the method in the prototype, so shadowing the dispatcher
10 // stored on Object.prototype. 8 // stored on Object.prototype.
11 9
12 // Version 1: It might be possible to call foo directly. 10 // Version 1: It might be possible to call foo directly.
13 class A1 native "*A1" { 11 class A1 native "*A1" {
14 foo() native; 12 foo() native;
15 } 13 }
16 14
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 caught = false; 92 caught = false;
95 try { 93 try {
96 var x = 123; 94 var x = 123;
97 x.foo(20); 95 x.foo(20);
98 } catch (ex) { 96 } catch (ex) {
99 caught = true; 97 caught = true;
100 Expect.isTrue(ex is NoSuchMethodError); 98 Expect.isTrue(ex is NoSuchMethodError);
101 } 99 }
102 Expect.isTrue(caught, "x.foo(20) should throw"); 100 Expect.isTrue(caught, "x.foo(20) should throw");
103 } 101 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698