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

Side by Side Diff: tests/language/src/ThirdTest.dart

Issue 10248007: test rename overhaul: step 8 - language tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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/src/TestNegativeTest.dart ('k') | tests/language/src/ThisTest.dart » ('j') | 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) 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
3 // BSD-style license that can be found in the LICENSE file.
4 // Third dart test program.
5
6 class A extends B {
7 var a;
8 static var s;
9
10 static foo() {
11 return s;
12 }
13
14 A(x, y) : super(y), a = x { }
15
16 value() {
17 return a + b + foo();
18 }
19 }
20
21
22 class B {
23 var b;
24 static var s;
25
26 static foo(x) {
27 return x + s;
28 }
29
30 value() {
31 return b + foo(s) + A.foo();
32 }
33
34 B(x) : b = x {
35 b = b + 1;
36 }
37 }
38
39
40 class ThirdTest {
41 static testMain() {
42 var a = new A(1, 2);
43 var b = new B(3);
44 A.s = 4;
45 B.s = 5;
46 Expect.equals(26, a.value() + b.value());
47 }
48 }
49
50 main() {
51 ThirdTest.testMain();
52 }
OLDNEW
« no previous file with comments | « tests/language/src/TestNegativeTest.dart ('k') | tests/language/src/ThisTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698