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

Unified Diff: tests/language/field_initialization_order_test.dart

Issue 10908007: Add test for final field initialization (fails on the VM). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | « no previous file | tests/language/final_field_initialization_order_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/field_initialization_order_test.dart
diff --git a/tests/language/field_initialization_order_test.dart b/tests/language/field_initialization_order_test.dart
index 2afaf3a2a7c754a6f7c4f94e7445d1c39625b23f..68908957ff627ae3c5bd0e270a0a67fc5867223f 100644
--- a/tests/language/field_initialization_order_test.dart
+++ b/tests/language/field_initialization_order_test.dart
@@ -1,6 +1,7 @@
// 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 that field initializers are evaluated in the right order.
int counter = 0;
@@ -62,9 +63,14 @@ main() {
Expect.equals('b.a.bi.', run(() => new TwoFields.initB()));
Expect.equals('b.a.ai.bi.', run(() => new TwoFields.initBoth()));
- Expect.equals('b.a.', run(() => new InheritOneField()));
- Expect.equals('b.bi.a.', run(() => new InheritOneField.init()));
- Expect.equals('b.a.ai.', run(() => new InheritOneField.superWithInit()));
- Expect.equals('b.bi.a.ai.', run(() => new InheritOneField.initWithSuperInit()));
- Expect.equals('b.a.ai.bi.', run(() => new InheritOneField.initWithSuperInit2()));
+ Expect.equals('b.a.', run(() =>
+ new InheritOneField()));
+ Expect.equals('b.bi.a.', run(() =>
+ new InheritOneField.init()));
+ Expect.equals('b.a.ai.', run(() =>
+ new InheritOneField.superWithInit()));
+ Expect.equals('b.bi.a.ai.', run(() =>
+ new InheritOneField.initWithSuperInit()));
+ Expect.equals('b.a.ai.bi.', run(() =>
+ new InheritOneField.initWithSuperInit2()));
}
« no previous file with comments | « no previous file | tests/language/final_field_initialization_order_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698