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

Side by Side Diff: tests/language/class_syntax2_test.dart

Issue 2997723002: Revert "Migrating a block of dart 2:" (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « tests/language/class_override_test.dart ('k') | tests/language/class_syntax_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Regression test for dart2js bug http://dartbug.com/11570. 5 // Regression test for dart2js bug http://dartbug.com/11570.
6 6
7 import 'package:expect/expect.dart'; 7 import 'package:expect/expect.dart';
8 8
9 void main() { 9 void main() {
10 var c = new Cool(true); 10 var c = new Cool(true);
11 Expect.stringEquals('{}', '${c.thing}'); 11 Expect.stringEquals('{}', '${c.thing}');
12 12
13 c = new Cool(false); 13 c = new Cool(false);
14 Expect.stringEquals('[]', '${c.thing}'); 14 Expect.stringEquals('[]', '${c.thing}');
15 15
16 c = new Cool.alt(true); 16 c = new Cool.alt(true);
17 Expect.stringEquals('{}', '${c.thing}'); 17 Expect.stringEquals('{}', '${c.thing}');
18 18
19 c = new Cool.alt(false); 19 c = new Cool.alt(false);
20 Expect.stringEquals('[]', '${c.thing}'); 20 Expect.stringEquals('[]', '${c.thing}');
21 } 21 }
22 22
23 class Cool { 23 class Cool {
24 final thing; 24 final thing;
25 25
26 Cool(bool option) : thing = option ? <String, String>{} : <String>[]; 26 Cool(bool option) : thing = option ? <String, String>{} : <String>[];
27 Cool.alt(bool option) : thing = !option ? <String>[] : <String, String>{}; 27 Cool.alt(bool option) : thing = !option ? <String>[] : <String, String>{};
28 } 28 }
OLDNEW
« no previous file with comments | « tests/language/class_override_test.dart ('k') | tests/language/class_syntax_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698