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

Side by Side Diff: frog/tests/leg_only/invoke_dynamic_test.dart

Issue 10536169: Move frog/tests/{leg,leg_only,frog_native} to tests/compiler/. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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
(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
5 class A {
6 foo() { return 499; }
7 bar(x) { return x + 499; }
8 baz() { return 54; }
9 titi() { return 123; }
10 }
11
12 class B {
13 foo() { return 42; }
14 bar(x) { return x + 42; }
15 toto() { return foo() + 42; }
16 }
17
18 class C extends A {
19 foo() { return 99; }
20 bar(x) { return x + 99; }
21 }
22
23 void main() {
24 var a = new A();
25 Expect.equals(499, a.foo());
26 Expect.equals(500, a.bar(1));
27 var b = new B();
28 Expect.equals(42, b.foo());
29 Expect.equals(43, b.bar(1));
30 var c = new C();
31 Expect.equals(99, c.foo());
32 Expect.equals(100, c.bar(1));
33
34 Expect.equals(54, a.baz());
35 Expect.equals(54, c.baz());
36
37 // We don't call a.titi. This means that the compiler needs to trigger the
38 // compilation of A.titi by going through the super-chain.
39 Expect.equals(123, c.titi());
40
41 Expect.equals(84, b.toto());
42 }
OLDNEW
« no previous file with comments | « frog/tests/leg_only/invalid_length_negative_test.dart ('k') | frog/tests/leg_only/is_operator_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698