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

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

Issue 10829416: Update language tests to new getter syntax. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 4 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 class OneArg<A> { 5 class OneArg<A> {
6 OneArg<A> get foo() => new OneArg<A>(); 6 OneArg<A> get foo => new OneArg<A>();
7 OneArg<A> get bar() { 7 OneArg<A> get bar {
8 return new OneArg<A>(); 8 return new OneArg<A>();
9 } 9 }
10 } 10 }
11 11
12 class TwoArgs<A,B> { 12 class TwoArgs<A,B> {
13 TwoArgs<A,B> get foo() => new TwoArgs<A,B>(); 13 TwoArgs<A,B> get foo => new TwoArgs<A,B>();
14 TwoArgs<A,B> get bar() { 14 TwoArgs<A,B> get bar {
15 return new TwoArgs<A,B>(); 15 return new TwoArgs<A,B>();
16 } 16 }
17 17
18 } 18 }
19 19
20 void main() { 20 void main() {
21 Expect.isTrue(new OneArg<String>().foo is OneArg); 21 Expect.isTrue(new OneArg<String>().foo is OneArg);
22 Expect.isTrue(new OneArg<String>().bar is OneArg); 22 Expect.isTrue(new OneArg<String>().bar is OneArg);
23 Expect.isTrue(new TwoArgs<String, int>().foo is TwoArgs); 23 Expect.isTrue(new TwoArgs<String, int>().foo is TwoArgs);
24 Expect.isTrue(new TwoArgs<String, int>().bar is TwoArgs); 24 Expect.isTrue(new TwoArgs<String, int>().bar is TwoArgs);
25 25
26 // TODO(karlklose): Please remove the return when dart2js can handle 26 // TODO(karlklose): Please remove the return when dart2js can handle
27 // the type tests after it. 27 // the type tests after it.
28 return; 28 return;
29 Expect.isTrue(new OneArg<String>().foo is OneArg<String>); 29 Expect.isTrue(new OneArg<String>().foo is OneArg<String>);
30 Expect.isTrue(new OneArg<String>().bar is OneArg<String>); 30 Expect.isTrue(new OneArg<String>().bar is OneArg<String>);
31 Expect.isTrue(new TwoArgs<String, int>().foo is TwoArgs<String, int>); 31 Expect.isTrue(new TwoArgs<String, int>().foo is TwoArgs<String, int>);
32 Expect.isTrue(new TwoArgs<String, int>().bar is TwoArgs<String, int>); 32 Expect.isTrue(new TwoArgs<String, int>().bar is TwoArgs<String, int>);
33 } 33 }
OLDNEW
« no previous file with comments | « dart/tests/language/side_effect_throw_test.dart ('k') | dart/tests/language/static_implicit_closure_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698