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

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

Issue 849863002: Replace @ReflectiveTestCase() with @reflectiveTest. (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
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/element.dart'; 9 import 'package:analyzer/src/generated/element.dart';
10 import 'package:analyzer/src/generated/engine.dart'; 10 import 'package:analyzer/src/generated/engine.dart';
11 import 'package:analyzer/src/generated/error.dart'; 11 import 'package:analyzer/src/generated/error.dart';
12 import 'package:analyzer/src/generated/html.dart' as html; 12 import 'package:analyzer/src/generated/html.dart' as html;
13 import 'package:analyzer/src/generated/java_core.dart'; 13 import 'package:analyzer/src/generated/java_core.dart';
14 import 'package:analyzer/src/generated/resolver.dart'; 14 import 'package:analyzer/src/generated/resolver.dart';
15 import 'package:analyzer/src/generated/source.dart'; 15 import 'package:analyzer/src/generated/source.dart';
16 import 'package:analyzer/src/generated/utilities_dart.dart'; 16 import 'package:analyzer/src/generated/utilities_dart.dart';
17 import 'package:unittest/unittest.dart'; 17 import 'package:unittest/unittest.dart';
18 18
19 import 'generated/ast_test.dart'; 19 import 'generated/ast_test.dart';
20 import 'reflective_tests.dart'; 20 import 'reflective_tests.dart';
21 21
22 void main() { 22 void main() {
23 groupSep = ' | '; 23 groupSep = ' | ';
24 runReflectiveTests(EnumTest); 24 runReflectiveTests(EnumTest);
25 } 25 }
26 26
27 27
28 @ReflectiveTestCase() 28 @reflectiveTest
29 class EnumTest { 29 class EnumTest {
30 void test_AnalysisLevel() { 30 void test_AnalysisLevel() {
31 new EnumTester<AnalysisLevel>() 31 new EnumTester<AnalysisLevel>()
32 ..check_getters() 32 ..check_getters()
33 ..check_explicit_values(); 33 ..check_explicit_values();
34 } 34 }
35 35
36 void test_AssignmentKind() { 36 void test_AssignmentKind() {
37 new EnumTester<AssignmentKind>() 37 new EnumTester<AssignmentKind>()
38 ..check_getters() 38 ..check_getters()
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 232
233 // Check that the set of ordinals runs from 0 to N-1, where N is the number 233 // Check that the set of ordinals runs from 0 to N-1, where N is the number
234 // of enumerated values. 234 // of enumerated values.
235 Set<int> expectedOrdinals = new Set<int>(); 235 Set<int> expectedOrdinals = new Set<int>();
236 for (int i = 0; i < numValues; i++) { 236 for (int i = 0; i < numValues; i++) {
237 expectedOrdinals.add(i); 237 expectedOrdinals.add(i);
238 } 238 }
239 expect(ordinals.keys.toSet(), equals(expectedOrdinals)); 239 expect(ordinals.keys.toSet(), equals(expectedOrdinals));
240 } 240 }
241 } 241 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698