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

Side by Side Diff: tests/language/core_type_check_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/continue_test.dart ('k') | tests/language/ct_const3_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) 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 check(value, expectComparable, expectPattern) { 5 check(value, expectComparable, expectPattern) {
8 Expect.equals(expectComparable, value is Comparable); 6 Expect.equals(expectComparable, value is Comparable);
9 Expect.equals(expectPattern, value is Pattern); 7 Expect.equals(expectPattern, value is Pattern);
10 } 8 }
11 9
12 int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1)); 10 int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1));
13 11
14 class A implements Comparable { 12 class A implements Comparable {
15 } 13 }
16 14
(...skipping 13 matching lines...) Expand all
30 check(things[inscrutable(0)], false, false); // List 28 check(things[inscrutable(0)], false, false); // List
31 check(things[inscrutable(1)], true, false); // int 29 check(things[inscrutable(1)], true, false); // int
32 check(things[inscrutable(2)], true, false); // num 30 check(things[inscrutable(2)], true, false); // num
33 check(things[inscrutable(3)], true, true); // string 31 check(things[inscrutable(3)], true, true); // string
34 check(things[inscrutable(4)], false, false); // Object 32 check(things[inscrutable(4)], false, false); // Object
35 check(things[inscrutable(5)], true, false); // A 33 check(things[inscrutable(5)], true, false); // A
36 check(things[inscrutable(6)], false, false); // B 34 check(things[inscrutable(6)], false, false); // B
37 check(things[inscrutable(7)], false, true); // C 35 check(things[inscrutable(7)], false, true); // C
38 check(things[inscrutable(8)], true, true); // D 36 check(things[inscrutable(8)], true, true); // D
39 } 37 }
OLDNEW
« no previous file with comments | « tests/language/continue_test.dart ('k') | tests/language/ct_const3_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698