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

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

Issue 12743005: Revert "Remove Expect from core library." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload (first upload failed). 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) 2011, the Dart project authors. Please see the AUTHORS file 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 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 // Dart test for function type alias with a type parameter as result type. 5 // Dart test for function type alias with a type parameter as result type.
6 6
7 import "package:expect/expect.dart";
8
9 typedef bool F<bool>(bool a); // 'bool' is not the boolean type. 7 typedef bool F<bool>(bool a); // 'bool' is not the boolean type.
10 8
11 bool bar(bool a) { 9 bool bar(bool a) {
12 } 10 }
13 11
14 int baz(int a) { 12 int baz(int a) {
15 } 13 }
16 14
17 class A<T> { 15 class A<T> {
18 T foo(T a) { 16 T foo(T a) {
(...skipping 10 matching lines...) Expand all
29 27
30 var b = new A<bool>(); 28 var b = new A<bool>();
31 var i = new A<int>(); 29 var i = new A<int>();
32 Expect.isTrue(b.foo is F); 30 Expect.isTrue(b.foo is F);
33 Expect.isTrue(i.foo is F); 31 Expect.isTrue(i.foo is F);
34 Expect.isTrue(b.foo is F<bool>); 32 Expect.isTrue(b.foo is F<bool>);
35 Expect.isTrue(i.foo is F<int>); 33 Expect.isTrue(i.foo is F<int>);
36 Expect.isTrue(b.foo is !F<int>); 34 Expect.isTrue(b.foo is !F<int>);
37 Expect.isTrue(i.foo is !F<bool>); 35 Expect.isTrue(i.foo is !F<bool>);
38 } 36 }
OLDNEW
« no previous file with comments | « tests/language/function_type_alias3_test.dart ('k') | tests/language/function_type_alias6_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698