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

Unified Diff: tests/language/generic_test.dart

Issue 3001803002: Migrate block 114 (and some of 113). (Closed)
Patch Set: Tweak app_jit status. Created 3 years, 4 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/generic_syntax_test.dart ('k') | tests/language/generics2_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/generic_test.dart
diff --git a/tests/language/generic_test.dart b/tests/language/generic_test.dart
deleted file mode 100644
index 225b1d837f650a7254fd0be9b396712aa03cda34..0000000000000000000000000000000000000000
--- a/tests/language/generic_test.dart
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (c) 2011, 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.
-// VMOptions=--checked
-// Dart test program testing generic type allocations and generic type tests.
-import "package:expect/expect.dart";
-
-class A {
- const A();
-}
-
-class AA extends A {
- const AA();
-}
-
-class AX {
- const AX();
-}
-
-class B<T extends A> {
- final A a_;
- final T t_;
- const B(T t)
- : a_ = t,
- t_ = t;
- isT(x) {
- return x is T;
- }
-}
-
-class C<T> {
- B<T> b_;
- C(T t) : b_ = new B<T>(t) {}
-}
-
-class D {
- C<AA> caa_;
- D() : caa_ = new C<AA>(const AA()) {}
-}
-
-class E {
- C<AX> cax_;
- E() : cax_ = new C<AX>(const AX()) {}
-}
-
-class GenericTest {
- static test() {
- int result = 0;
- D d = new D();
- Expect.equals(true, d.caa_.b_ is B<AA>);
- Expect.equals(true, d.caa_.b_.isT(const AA()));
- C c = new C(const AA()); // c is of raw type C, T in C<T> is dynamic.
- Expect.equals(true, c.b_ is B);
- Expect.equals(true, c.b_ is B<AA>);
- Expect.equals(true, c.b_.isT(const AA()));
- Expect.equals(true, c.b_.isT(const AX()));
- try {
- E e = new E(); // Throws a type error, if type checks are enabled.
- } on TypeError catch (error) {
- result = 1;
- }
- return result;
- }
-
- static testMain() {
- Expect.equals(1, test());
- }
-}
-
-main() {
- GenericTest.testMain();
-}
« no previous file with comments | « tests/language/generic_syntax_test.dart ('k') | tests/language/generics2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698