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

Side by Side Diff: tests/language_2/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_2/class_override_test.dart ('k') | tests/language_2/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
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 // Regression test for dart2js bug http://dartbug.com/11570.
6
7 import 'package:expect/expect.dart';
8
9 void main() {
10 var c = new Cool(true);
11 Expect.stringEquals('{}', '${c.thing}');
12
13 c = new Cool(false);
14 Expect.stringEquals('[]', '${c.thing}');
15
16 c = new Cool.alt(true);
17 Expect.stringEquals('{}', '${c.thing}');
18
19 c = new Cool.alt(false);
20 Expect.stringEquals('[]', '${c.thing}');
21 }
22
23 class Cool {
24 final thing;
25
26 Cool(bool option) : thing = option ? <String, String>{} : <String>[];
27 Cool.alt(bool option) : thing = !option ? <String>[] : <String, String>{};
28 }
OLDNEW
« no previous file with comments | « tests/language_2/class_override_test.dart ('k') | tests/language_2/class_syntax_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698