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

Side by Side Diff: tests/language/function_type_alias2_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
« no previous file with comments | « tests/language/function_test.dart ('k') | tests/language/function_type_alias3_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // VMOptions=--enable_type_checks 4 // VMOptions=--enable_type_checks
5 // 5 //
6 // Dart test for function type alias with optional parameters. 6 // Dart test for function type alias with optional parameters.
7 7
8 import "package:expect/expect.dart";
9
10 typedef int f1<T>([int a, int b, T c]); 8 typedef int f1<T>([int a, int b, T c]);
11 typedef int f2<T>([int a, int b, T d]); 9 typedef int f2<T>([int a, int b, T d]);
12 typedef int f3<T>({int a, int b, T c}); 10 typedef int f3<T>({int a, int b, T c});
13 typedef int f4<T>({int a, int b, T d}); 11 typedef int f4<T>({int a, int b, T d});
14 12
15 class A<T> { 13 class A<T> {
16 int baz([int a, int b, T c]) { } 14 int baz([int a, int b, T c]) { }
17 int bar({int a, int b, T c}) { } 15 int bar({int a, int b, T c}) { }
18 } 16 }
19 17
(...skipping 24 matching lines...) Expand all
44 Expect.isTrue(a.baz is f1); 42 Expect.isTrue(a.baz is f1);
45 Expect.isTrue(a.baz is f1<int>); 43 Expect.isTrue(a.baz is f1<int>);
46 Expect.isTrue(a.bar is f3<int>); 44 Expect.isTrue(a.bar is f3<int>);
47 Expect.isFalse(a.baz is f1<double>); 45 Expect.isFalse(a.baz is f1<double>);
48 Expect.isFalse(a.bar is f3<double>); 46 Expect.isFalse(a.bar is f3<double>);
49 Expect.isTrue(a.baz is f2); 47 Expect.isTrue(a.baz is f2);
50 Expect.isFalse(a.bar is f4); 48 Expect.isFalse(a.bar is f4);
51 Expect.isTrue(a.baz is f2<int>); 49 Expect.isTrue(a.baz is f2<int>);
52 Expect.isFalse(a.bar is f2<int>); 50 Expect.isFalse(a.bar is f2<int>);
53 } 51 }
OLDNEW
« no previous file with comments | « tests/language/function_test.dart ('k') | tests/language/function_type_alias3_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698