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

Unified Diff: tests/language/src/StaticFieldTest.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/StaticFieldTest.dart
diff --git a/tests/language/src/StaticFieldTest.dart b/tests/language/src/StaticFieldTest.dart
deleted file mode 100644
index 3b8ce18768da321a47826bed9ea5a13fcf0ee27b..0000000000000000000000000000000000000000
--- a/tests/language/src/StaticFieldTest.dart
+++ /dev/null
@@ -1,68 +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.
-// Dart test program for testing setting/getting/initializing static fields.
-
-class First {
- First() {}
- static var a;
- static var b;
- static final int c = 1;
- static setValues() {
- a = 24;
- b = 10;
- return a + b + c;
- }
-}
-
-
-class InitializerTest {
- static var one;
- static var two = 2;
- static var three = 2;
-
- static checkValueOfThree() {
- // We need to keep this check separate to prevent three from
- // getting initialized before the += is executed.
- Expect.equals(3, three);
- }
-
- static void testStaticFieldInitialization() {
- Expect.equals(null, one);
- Expect.equals(2, two);
- one = 11;
- two = 22;
- Expect.equals(11, one);
- Expect.equals(22, two);
-
- // Assignment operators exercise a different code path. Make sure
- // that initialization works here as well.
- three += 1;
- checkValueOfThree();
- }
-}
-
-
-class StaticFieldTest {
- static testMain() {
- First.a = 3;
- First.b = First.a;
- Expect.equals(3, First.a);
- Expect.equals(First.a, First.b);
- First.b = (First.a = 10);
- Expect.equals(10, First.a);
- Expect.equals(10, First.b);
- First.b = First.a = 15;
- Expect.equals(15, First.a);
- Expect.equals(15, First.b);
- Expect.equals(35, First.setValues());
- Expect.equals(24, First.a);
- Expect.equals(10, First.b);
- }
-}
-
-
-main() {
- StaticFieldTest.testMain();
- InitializerTest.testStaticFieldInitialization();
-}
« no previous file with comments | « tests/language/src/StaticField4aNegativeTest.dart ('k') | tests/language/src/StaticFinalField2NegativeTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698