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

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

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated latest tests. 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) 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 4
5 import "package:expect/expect.dart";
6
5 class B { 7 class B {
6 static var x; 8 static var x;
7 operator <<(other) { 9 operator <<(other) {
8 x = other; 10 x = other;
9 return 33; 11 return 33;
10 } 12 }
11 } 13 }
12 14
13 class A { 15 class A {
14 get _m => new B(); 16 get _m => new B();
15 opshl(n) { 17 opshl(n) {
16 // 'n' must be a number, but we are not allowed to throw before we have 18 // 'n' must be a number, but we are not allowed to throw before we have
17 // evaluated _m << 499. 19 // evaluated _m << 499.
18 return (_m << 499) | (2 - n); 20 return (_m << 499) | (2 - n);
19 } 21 }
20 } 22 }
21 23
22 main() { 24 main() {
23 var a = new A(); 25 var a = new A();
24 Expect.throws(() => a.opshl("string")); 26 Expect.throws(() => a.opshl("string"));
25 Expect.equals(499, B.x); 27 Expect.equals(499, B.x);
26 } 28 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698