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

Side by Side Diff: tests/corelib/is_operator_basic_types_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 // Dart test program for the "is" type test operator. 4 // Dart test program for the "is" type test operator.
5 5
6 import "package:expect/expect.dart";
7
8 check(args) { 6 check(args) {
9 var list = args[0]; 7 var list = args[0];
10 var string = args[1]; 8 var string = args[1];
11 var nullObject = args[2]; 9 var nullObject = args[2];
12 10
13 Expect.isTrue(list is Object); 11 Expect.isTrue(list is Object);
14 Expect.isTrue(list is List); 12 Expect.isTrue(list is List);
15 Expect.isTrue(list is Collection); 13 Expect.isTrue(list is Collection);
16 Expect.isTrue(list is Iterable); 14 Expect.isTrue(list is Iterable);
17 Expect.isFalse(list is Comparable); 15 Expect.isFalse(list is Comparable);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 56
59 main() { 57 main() {
60 // Try to make it hard for an optimizing compiler to inline the 58 // Try to make it hard for an optimizing compiler to inline the
61 // tests. 59 // tests.
62 check([[], 'string', null]); 60 check([[], 'string', null]);
63 61
64 // Try to make it even harder. 62 // Try to make it even harder.
65 var string = new String.fromCharCodes([new DateTime.now().year % 100 + 1]); 63 var string = new String.fromCharCodes([new DateTime.now().year % 100 + 1]);
66 check([string.codeUnits, string, null]); 64 check([string.codeUnits, string, null]);
67 } 65 }
OLDNEW
« no previous file with comments | « tests/corelib/integer_to_radix_string_test.dart ('k') | tests/corelib/iterable_element_at_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698