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

Side by Side Diff: tests/language/instanceof2_test.dart

Issue 11312122: Change List constructors. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Reupload. Adapt code for List.fixedLength. Created 8 years 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) 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 // Dart test program for testing the instanceof operation. 4 // Dart test program for testing the instanceof operation.
5 5
6 interface I { } 6 interface I { }
7 7
8 interface AI extends I { } 8 interface AI extends I { }
9 9
10 class A implements AI { 10 class A implements AI {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 Expect.equals(false, c is B); 47 Expect.equals(false, c is B);
48 Expect.equals(false, n is A); 48 Expect.equals(false, n is A);
49 49
50 Expect.equals(false, null is A); 50 Expect.equals(false, null is A);
51 Expect.equals(false, null is B); 51 Expect.equals(false, null is B);
52 Expect.equals(false, null is C); 52 Expect.equals(false, null is C);
53 Expect.equals(false, null is AI); 53 Expect.equals(false, null is AI);
54 Expect.equals(false, null is I); 54 Expect.equals(false, null is I);
55 55
56 { 56 {
57 var a = new List(5); 57 var a = new List.fixedLength(5);
58 Expect.equals(true, a is List); 58 Expect.equals(true, a is List);
59 Expect.equals(true, a is List<Object>); 59 Expect.equals(true, a is List<Object>);
60 Expect.equals(true, a is List<int>); 60 Expect.equals(true, a is List<int>);
61 Expect.equals(true, a is List<num>); 61 Expect.equals(true, a is List<num>);
62 Expect.equals(true, a is List<String>); 62 Expect.equals(true, a is List<String>);
63 } 63 }
64 { 64 {
65 var a = new List<Object>(5); 65 var a = new List<Object>(5);
66 Expect.equals(true, a is List); 66 Expect.equals(true, a is List);
67 Expect.equals(true, a is List<Object>); 67 Expect.equals(true, a is List<Object>);
(...skipping 28 matching lines...) Expand all
96 } 96 }
97 } 97 }
98 98
99 main() { 99 main() {
100 // Repeat type checks so that inlined tests can be tested as well. 100 // Repeat type checks so that inlined tests can be tested as well.
101 for (int i = 0; i < 5; i++) { 101 for (int i = 0; i < 5; i++) {
102 InstanceofTest.testMain(); 102 InstanceofTest.testMain();
103 } 103 }
104 } 104 }
105 105
OLDNEW
« no previous file with comments | « tests/language/inst_field_initializer1_negative_test.dart ('k') | tests/language/list_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698