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

Unified Diff: tests/language/src/InstFieldInitializerTest.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
Index: tests/language/src/InstFieldInitializerTest.dart
diff --git a/tests/language/src/InstFieldInitializerTest.dart b/tests/language/src/InstFieldInitializerTest.dart
deleted file mode 100644
index 9d30ccdf6c38b2afb5562a23819a15089068ba60..0000000000000000000000000000000000000000
--- a/tests/language/src/InstFieldInitializerTest.dart
+++ /dev/null
@@ -1,60 +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.
-// Test for instance field initializer expressions.
-
-class Cheese {
- static final mild = 1;
- static final stinky = 2;
-
- // Instance fields with initializer expression.
- String name = "";
- var smell = mild;
-
- Cheese() {
- Expect.equals("", this.name);
- Expect.equals(Cheese.mild, this.smell);
- }
-
- Cheese.initInBlock(String s) {
- Expect.equals("", this.name);
- Expect.equals(Cheese.mild, this.smell);
- this.name = s;
- }
-
- Cheese.initFieldParam(this.name, this.smell) {
- }
-
- // Test that static final field Cheese.mild is not shadowed
- // by the parameter mild when compiling the field initializer
- // for instance field smell.
- Cheese.hideAndSeek(var mild) : name = mild {
- Expect.equals(mild, this.name);
- Expect.equals(Cheese.mild, this.smell);
- }
-}
-
-class HasNoExplicitConstructor {
- String s = "Tilsiter";
-}
-
-main() {
- var generic = new Cheese();
- Expect.equals("", generic.name);
- Expect.equals(Cheese.mild, generic.smell);
-
- var gruyere = new Cheese.initInBlock("Gruyere");
- Expect.equals("Gruyere", gruyere.name);
- Expect.equals(Cheese.mild, gruyere.smell);
-
- var munster = new Cheese.initFieldParam("Munster", Cheese.stinky);
- Expect.equals("Munster", munster.name);
- Expect.equals(Cheese.stinky, munster.smell);
-
- var brie = new Cheese.hideAndSeek("Brie");
- Expect.equals("Brie", brie.name);
- Expect.equals(Cheese.mild, brie.smell);
-
- var t = new HasNoExplicitConstructor();
- Expect.equals("Tilsiter", t.s);
-}

Powered by Google App Engine
This is Rietveld 408576698