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/super_setter_interceptor_test.dart

Issue 12374094: Implement complex super assignment. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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
« no previous file with comments | « tests/language/super_operator_index7_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 // Test that we correctly intercept super getter and setter calls.
6
7 var expected;
8
9 class A {
10 set length(a) { Expect.equals(expected, a); }
11 get length => 41;
12 }
13
14 class B extends A {
15 test() {
16 expected = 42;
17 Expect.equals(42, super.length = 42);
18 expected = 42;
19 Expect.equals(42, super.length += 1);
20 expected = 42;
21 Expect.equals(42, ++super.length);
22 expected = 40;
23 Expect.equals(40, --super.length);
24 expected = 42;
25 Expect.equals(41, super.length++);
26 expected = 40;
27 Expect.equals(41, super.length--);
28 Expect.equals(41, super.length);
29 }
30 }
31
32 main() {
33 // Ensures the list class is instantiated.
34 print([]);
35 new B().test();
36 }
OLDNEW
« no previous file with comments | « tests/language/super_operator_index7_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698