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

Unified Diff: tests/language/src/FieldOverrideTest.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/FieldMethodTest.dart ('k') | tests/language/src/FieldParameterTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/src/FieldOverrideTest.dart
diff --git a/tests/language/src/FieldOverrideTest.dart b/tests/language/src/FieldOverrideTest.dart
deleted file mode 100644
index 15e561b03d612559569e41820cd9741e4253b754..0000000000000000000000000000000000000000
--- a/tests/language/src/FieldOverrideTest.dart
+++ /dev/null
@@ -1,45 +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 overriding of fields.
-
-
-class A {}
-class B1 extends A {}
-class B2 extends A {}
-
-class Super {
- Super() : super();
-
- B1 field;
-}
-
-class Sub extends Super {
- Sub() : super();
-
- A field;
-}
-
-class SubSub extends Super {
- SubSub() : super();
-
- // B2 not assignable to B1
- B2 field; /// 01: static type warning
-}
-
-main() {
- SubSub val1 = new SubSub();
- val1.field = new B2(); /// 02: static type warning
- Expect.equals(true, val1.field is B2); /// 02: continued
-
- Sub val2 = new Sub();
- val2.field = new A();
- Expect.equals(true, val2.field is A);
- Expect.equals(false, val2.field is B1);
- Expect.equals(false, val2.field is B2);
-
- Super val3 = new Super();
- val3.field = new B1();
- Expect.equals(true, val3.field is B1);
- Expect.equals(false, val3.field is B2);
-}
« no previous file with comments | « tests/language/src/FieldMethodTest.dart ('k') | tests/language/src/FieldParameterTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698