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

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

Issue 10248007: test rename overhaul: step 8 - language tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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) 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 // Test that instanceof works correctly with type variables. 4 // Test that instanceof works correctly with type variables.
5 5
6 class Foo<T> { 6 class Foo<T> {
7 Foo() {} 7 Foo() {}
8 8
9 bool isT(x) { // Untyped parameter to ensure that the static type 9 bool isT(x) { // Untyped parameter to ensure that the static type
10 // does not affect the result. 10 // does not affect the result.
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 { 118 {
119 Foo foo = new Foo<String>(); 119 Foo foo = new Foo<String>();
120 Expect.equals(true, foo.isListT(new List(5))); 120 Expect.equals(true, foo.isListT(new List(5)));
121 Expect.equals(false, foo.isListT(new List<Object>(5))); 121 Expect.equals(false, foo.isListT(new List<Object>(5)));
122 Expect.equals(false, foo.isListT(new List<int>(5))); 122 Expect.equals(false, foo.isListT(new List<int>(5)));
123 Expect.equals(false, foo.isListT(new List<num>(5))); 123 Expect.equals(false, foo.isListT(new List<num>(5)));
124 Expect.equals(true, foo.isListT(new List<String>(5))); 124 Expect.equals(true, foo.isListT(new List<String>(5)));
125 } 125 }
126 } 126 }
127 } 127 }
OLDNEW
« no previous file with comments | « tests/language/generic_inheritance_test.dart ('k') | tests/language/generic_instanceof2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698