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

Side by Side Diff: tests/language/super_setter_interceptor_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) 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 // Test that we correctly intercept super getter and setter calls. 5 // Test that we correctly intercept super getter and setter calls.
6 6
7 import "package:expect/expect.dart";
8
7 var expected; 9 var expected;
8 10
9 class A { 11 class A {
10 set length(a) { Expect.equals(expected, a); } 12 set length(a) { Expect.equals(expected, a); }
11 get length => 41; 13 get length => 41;
12 } 14 }
13 15
14 class B extends A { 16 class B extends A {
15 test() { 17 test() {
16 expected = 42; 18 expected = 42;
(...skipping 10 matching lines...) Expand all
27 Expect.equals(41, super.length--); 29 Expect.equals(41, super.length--);
28 Expect.equals(41, super.length); 30 Expect.equals(41, super.length);
29 } 31 }
30 } 32 }
31 33
32 main() { 34 main() {
33 // Ensures the list class is instantiated. 35 // Ensures the list class is instantiated.
34 print([]); 36 print([]);
35 new B().test(); 37 new B().test();
36 } 38 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698