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

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

Issue 858553002: Fix enum_syntax_test for dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/language/language_dart2js.status » ('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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 // SharedOptions=--enable-enum 5 // SharedOptions=--enable-enum
6 6
7 // Basic syntax test for enumeration types 7 // Basic syntax test for enumeration types
8 8
9 import 'package:expect/expect.dart'; 9 import 'package:expect/expect.dart';
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 var zzTop; 46 var zzTop;
47 enum zzTop { Billy, Dusty, Frank } /// 11: compile-time error 47 enum zzTop { Billy, Dusty, Frank } /// 11: compile-time error
48 48
49 // Enum type cannot be super type or interface type. 49 // Enum type cannot be super type or interface type.
50 class Rainbow extends Color {} /// 20: compile-time error 50 class Rainbow extends Color {} /// 20: compile-time error
51 class Rainbow implements Color {} /// 21: compile-time error 51 class Rainbow implements Color {} /// 21: compile-time error
52 class Rainbow extends List with Color {} /// 22: compile-time error 52 class Rainbow extends List with Color {} /// 22: compile-time error
53 53
54 main() { 54 main() {
55 Nada x; /// 01: continued
55 var x = ComeAgain.zipfel; /// 02: continued 56 var x = ComeAgain.zipfel; /// 02: continued
56 var x = ComeAgain.zipfel; /// 03: continued 57 var x = ComeAgain.zipfel; /// 03: continued
57 var x = ComeAgain.zipfel; /// 04: continued 58 var x = ComeAgain.zipfel; /// 04: continued
58 var x = ComeAgain.zipfel; /// 05: continued 59 var x = ComeAgain.zipfel; /// 05: continued
59 var x = ComeAgain.zipfel; /// 06: continued 60 var x = ComeAgain.zipfel; /// 06: continued
60 var x = Numbers.four; /// 07: continued 61 var x = Numbers.four; /// 07: continued
61 var x = topLevelFunction.bla; /// 09: continued 62 var x = topLevelFunction.bla; /// 09: continued
62 var x = C.bla; /// 10: continued 63 var x = C.bla; /// 10: continued
63 var x = zzTop.Frank; /// 11: continued 64 var x = zzTop.Frank; /// 11: continued
64 65
65 var x = new Rainbow(); /// 20: continued 66 var x = new Rainbow(); /// 20: continued
66 var x = new Rainbow(); /// 21: continued 67 var x = new Rainbow(); /// 21: continued
67 var x = new Rainbow(); /// 22: continued 68 var x = new Rainbow(); /// 22: continued
68 69
69 // It is a compile-time error to explicitly instantiate an enum instance. 70 // It is a compile-time error to explicitly instantiate an enum instance.
70 var x = new Color(); /// 30: compile-time error 71 var x = new Color(); /// 30: compile-time error
71 } 72 }
72 73
OLDNEW
« no previous file with comments | « no previous file | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698