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

Side by Side Diff: pkg/analyzer/test/enum_test.dart

Issue 706283002: Fix remaining error code classes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 | « pkg/analyzer/lib/src/generated/scanner.dart ('k') | no next file » | 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 library test.enums; 5 library test.enums;
6 6
7 import 'dart:mirrors'; 7 import 'dart:mirrors';
8 8
9 import 'package:analyzer/src/generated/ast.dart'; 9 import 'package:analyzer/src/generated/ast.dart';
10 import 'package:analyzer/src/generated/element.dart'; 10 import 'package:analyzer/src/generated/element.dart';
11 import 'package:analyzer/src/generated/engine.dart'; 11 import 'package:analyzer/src/generated/engine.dart';
12 import 'package:analyzer/src/generated/error.dart'; 12 import 'package:analyzer/src/generated/error.dart';
13 import 'package:analyzer/src/generated/html.dart' as html; 13 import 'package:analyzer/src/generated/html.dart' as html;
14 import 'package:analyzer/src/generated/instrumentation.dart'; 14 import 'package:analyzer/src/generated/instrumentation.dart';
15 import 'package:analyzer/src/generated/java_core.dart'; 15 import 'package:analyzer/src/generated/java_core.dart';
16 import 'package:analyzer/src/generated/parser.dart';
17 import 'package:analyzer/src/generated/resolver.dart'; 16 import 'package:analyzer/src/generated/resolver.dart';
18 import 'package:analyzer/src/generated/scanner.dart' as scanner; 17 import 'package:analyzer/src/generated/scanner.dart' as scanner;
19 import 'package:analyzer/src/generated/source.dart'; 18 import 'package:analyzer/src/generated/source.dart';
20 import 'package:analyzer/src/generated/utilities_dart.dart'; 19 import 'package:analyzer/src/generated/utilities_dart.dart';
21 import 'package:unittest/unittest.dart'; 20 import 'package:unittest/unittest.dart';
22 21
23 import 'generated/ast_test.dart'; 22 import 'generated/ast_test.dart';
24 import 'reflective_tests.dart'; 23 import 'reflective_tests.dart';
25 24
26 void main() { 25 void main() {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 ..check_getters() 113 ..check_getters()
115 ..check_explicit_values(); 114 ..check_explicit_values();
116 } 115 }
117 116
118 void test_ParameterKind() { 117 void test_ParameterKind() {
119 new EnumTester<ParameterKind>() 118 new EnumTester<ParameterKind>()
120 ..check_getters() 119 ..check_getters()
121 ..check_explicit_values(); 120 ..check_explicit_values();
122 } 121 }
123 122
124 void test_ParserErrorCode() {
125 new EnumTester<ParserErrorCode>()
126 ..check_getters()
127 ..check_explicit_values();
128 }
129
130 void test_RedirectingConstructorKind() { 123 void test_RedirectingConstructorKind() {
131 new EnumTester<RedirectingConstructorKind>() 124 new EnumTester<RedirectingConstructorKind>()
132 ..check_getters() 125 ..check_getters()
133 ..check_explicit_values(); 126 ..check_explicit_values();
134 } 127 }
135 128
136 void test_ResolverErrorCode() {
137 new EnumTester<ResolverErrorCode>()
138 ..check_getters()
139 ..check_explicit_values();
140 }
141
142 void test_RetentionPriority() { 129 void test_RetentionPriority() {
143 new EnumTester<RetentionPriority>() 130 new EnumTester<RetentionPriority>()
144 ..check_getters() 131 ..check_getters()
145 ..check_explicit_values(); 132 ..check_explicit_values();
146 } 133 }
147 134
148 void test_scanner_TokenType() { 135 void test_scanner_TokenType() {
149 new EnumTester<scanner.TokenType>() 136 new EnumTester<scanner.TokenType>()
150 ..check_getters() 137 ..check_getters()
151 ..check_explicit_values(); 138 ..check_explicit_values();
152 } 139 }
153 140
154 void test_ScannerErrorCode() {
155 new EnumTester<scanner.ScannerErrorCode>()
156 ..check_getters()
157 ..check_explicit_values();
158 }
159
160 void test_SourceKind() { 141 void test_SourceKind() {
161 new EnumTester<SourceKind>() 142 new EnumTester<SourceKind>()
162 ..check_getters() 143 ..check_getters()
163 ..check_explicit_values(); 144 ..check_explicit_values();
164 } 145 }
165 146
166 void test_SourcePriority() { 147 void test_SourcePriority() {
167 new EnumTester<SourcePriority>() 148 new EnumTester<SourcePriority>()
168 ..check_getters() 149 ..check_getters()
169 ..check_explicit_values(); 150 ..check_explicit_values();
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 277
297 // Check that the set of ordinals runs from 0 to N-1, where N is the number 278 // Check that the set of ordinals runs from 0 to N-1, where N is the number
298 // of enumerated values. 279 // of enumerated values.
299 Set<int> expectedOrdinals = new Set<int>(); 280 Set<int> expectedOrdinals = new Set<int>();
300 for (int i = 0; i < numValues; i++) { 281 for (int i = 0; i < numValues; i++) {
301 expectedOrdinals.add(i); 282 expectedOrdinals.add(i);
302 } 283 }
303 expect(ordinals.keys.toSet(), equals(expectedOrdinals)); 284 expect(ordinals.keys.toSet(), equals(expectedOrdinals));
304 } 285 }
305 } 286 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/scanner.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698