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

Side by Side Diff: tests/compiler/dart2js_native/core_type_check_native_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 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 native "*A" { 12 class A native "*A" {
15 } 13 }
16 14
(...skipping 30 matching lines...) Expand all
47 check(things[inscrutable(0)], false, false); // List 45 check(things[inscrutable(0)], false, false); // List
48 check(things[inscrutable(1)], true, false); // int 46 check(things[inscrutable(1)], true, false); // int
49 check(things[inscrutable(2)], true, false); // num 47 check(things[inscrutable(2)], true, false); // num
50 check(things[inscrutable(3)], true, true); // string 48 check(things[inscrutable(3)], true, true); // string
51 check(things[inscrutable(4)], false, false); // Object 49 check(things[inscrutable(4)], false, false); // Object
52 check(things[inscrutable(5)], false, false); // A 50 check(things[inscrutable(5)], false, false); // A
53 check(things[inscrutable(6)], true, false); // B 51 check(things[inscrutable(6)], true, false); // B
54 check(things[inscrutable(7)], false, true); // C 52 check(things[inscrutable(7)], false, true); // C
55 check(things[inscrutable(8)], true, true); // D 53 check(things[inscrutable(8)], true, true); // D
56 } 54 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js_foreign/native_wrapping_function_test.dart ('k') | tests/compiler/dart2js_native/foreign_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698