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

Side by Side Diff: tests/language/first_class_types_literals_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) 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 import "package:expect/expect.dart";
6
7 class C<T, U, V> {} 5 class C<T, U, V> {}
8 6
9 class D {} 7 class D {}
10 8
11 typedef int Foo(bool b); 9 typedef int Foo(bool b);
12 10
13 sameType(a, b) { 11 sameType(a, b) {
14 Expect.equals(a.runtimeType, b.runtimeType); 12 Expect.equals(a.runtimeType, b.runtimeType);
15 } 13 }
16 14
(...skipping 17 matching lines...) Expand all
34 // runtimeType on type is idempotent. 32 // runtimeType on type is idempotent.
35 Expect.equals((D).runtimeType, (D).runtimeType.runtimeType); 33 Expect.equals((D).runtimeType, (D).runtimeType.runtimeType);
36 34
37 // Test that operator calls on class literals go to Type. 35 // Test that operator calls on class literals go to Type.
38 Expect.throws(() => C = 1, (e) => e is NoSuchMethodError); 36 Expect.throws(() => C = 1, (e) => e is NoSuchMethodError);
39 Expect.throws(() => C++, (e) => e is NoSuchMethodError); 37 Expect.throws(() => C++, (e) => e is NoSuchMethodError);
40 Expect.throws(() => C + 1, (e) => e is NoSuchMethodError); 38 Expect.throws(() => C + 1, (e) => e is NoSuchMethodError);
41 Expect.throws(() => C[2], (e) => e is NoSuchMethodError); 39 Expect.throws(() => C[2], (e) => e is NoSuchMethodError);
42 Expect.throws(() => C[2] = 'hest', (e) => e is NoSuchMethodError); 40 Expect.throws(() => C[2] = 'hest', (e) => e is NoSuchMethodError);
43 } 41 }
OLDNEW
« no previous file with comments | « tests/language/first_class_types_libraries_test.dart ('k') | tests/language/first_class_types_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698