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

Unified Diff: tests/language/src/FieldTest.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/FieldParameterTest.dart ('k') | tests/language/src/FinalForInVariableTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/src/FieldTest.dart
diff --git a/tests/language/src/FieldTest.dart b/tests/language/src/FieldTest.dart
deleted file mode 100644
index f4e093d3356deea1348b5a037f6b17efee657e1e..0000000000000000000000000000000000000000
--- a/tests/language/src/FieldTest.dart
+++ /dev/null
@@ -1,71 +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.
-// Dart test program for testing setting/getting of instance fields.
-
-class First {
- First() {}
- var a;
- var b;
-
- addFields() {
- return a + b;
- }
-
- setValues() {
- a = 24;
- b = 10;
- return a + b;
- }
-}
-
-class Second extends First {
- // TODO: consider removing once http://b/4254120 is fixed.
- Second() : super() {}
- var c;
- get a() { return -12; }
- set b(a) { a.c = 12; }
-}
-
-class FieldTest {
- static one() {
- var f = new First();
- f.a = 3;
- f.b = f.a;
- Expect.equals(3, f.a);
- Expect.equals(f.a, f.b);
- f.b = (f.a = 10);
- Expect.equals(10, f.a);
- Expect.equals(10, f.b);
- f.b = f.a = 15;
- Expect.equals(15, f.a);
- Expect.equals(15, f.b);
- Expect.equals(30, f.addFields());
- Expect.equals(34, f.setValues());
- Expect.equals(24, f.a);
- Expect.equals(10, f.b);
- }
-
- static two() {
- // The tests below are a little cumbersome because not
- // everything is implemented yet.
- var o = new Second();
- // 'a' getter is overriden, always returns -12.
- Expect.equals(-12, o.a);
- o.a = 2;
- Expect.equals(-12, o.a);
- // 'b' setter is overriden to write 12 to field 'c'.
- o.b = o;
- Expect.equals(12, o.c);
- }
-
- static testMain() {
- // FieldTest.one();
- FieldTest.two();
- }
-}
-
-
-main() {
- FieldTest.testMain();
-}
« no previous file with comments | « tests/language/src/FieldParameterTest.dart ('k') | tests/language/src/FinalForInVariableTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698