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

Unified Diff: tests/language/src/GenericInstanceof2Test.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, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/language/src/GenericInstanceof.dart ('k') | tests/language/src/GenericInstanceof3Test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/src/GenericInstanceof2Test.dart
diff --git a/tests/language/src/GenericInstanceof2Test.dart b/tests/language/src/GenericInstanceof2Test.dart
deleted file mode 100644
index bb676880c5fced3a06a795021e7219cced39d32a..0000000000000000000000000000000000000000
--- a/tests/language/src/GenericInstanceof2Test.dart
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-// Test that instanceof works correctly with type variables.
-
-// Test that partially typed generic instances are correctly constructed.
-
-// Test factory case.
-class Foo<K, V> {
- Foo() { }
-
- factory Foo.fac() {
- return new Foo<K, V>();
- }
-
- FooString() {
- return new Foo<K, String>.fac();
- }
-}
-
-// Test constructor case.
-class Moo<K, V> {
- Moo() { }
-
- MooString() {
- return new Moo<K, String>();
- }
-}
-
-testAll () {
- var foo_int_num = new Foo<int, num>();
- Expect.isTrue(foo_int_num is Foo<int, num>);
- Expect.isTrue(foo_int_num is !Foo<int, String>);
- // foo_int_num.FooString() returns a Foo<int, String>
- Expect.isTrue(foo_int_num.FooString() is !Foo<int, num>);
- Expect.isTrue(foo_int_num.FooString() is Foo<int, String>);
-
- var foo_raw = new Foo();
- Expect.isTrue(foo_raw is Foo<int, num>);
- Expect.isTrue(foo_raw is Foo<int, String>);
- // foo_raw.FooString() returns a Foo<Dynamic, String>
- Expect.isTrue(foo_raw.FooString() is !Foo<int, num>);
- Expect.isTrue(foo_raw.FooString() is Foo<int, String>);
-
- var moo_int_num = new Moo<int, num>();
- Expect.isTrue(moo_int_num is Moo<int, num>);
- Expect.isTrue(moo_int_num is !Moo<int, String>);
- // moo_int_num.MooString() returns a Moo<int, String>
- Expect.isTrue(moo_int_num.MooString() is !Moo<int, num>);
- Expect.isTrue(moo_int_num.MooString() is Moo<int, String>);
-
- var moo_raw = new Moo();
- Expect.isTrue(moo_raw is Moo<int, num>);
- Expect.isTrue(moo_raw is Moo<int, String>);
- // moo_raw.MooString() returns a Moo<Dynamic, String>
- Expect.isTrue(moo_raw.MooString() is !Moo<int, num>);
- Expect.isTrue(moo_raw.MooString() is Moo<int, String>);
-}
-
-
-main() {
- // Repeat type checks so that inlined tests can be tested as well.
- for (int i = 0; i < 5; i++) {
- testAll();
- }
-}
« no previous file with comments | « tests/language/src/GenericInstanceof.dart ('k') | tests/language/src/GenericInstanceof3Test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698