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

Side by Side Diff: pkg/analyzer/test/generated/compile_time_error_code_test.dart

Issue 2391423003: Switch 'analyzer' to 'package:test' and test_reflective_loader ^0.1.0. (Closed)
Patch Set: Created 4 years, 2 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
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 analyzer.test.generated.compile_time_error_code_test; 5 library analyzer.test.generated.compile_time_error_code_test;
6 6
7 import 'package:analyzer/error/error.dart'; 7 import 'package:analyzer/error/error.dart';
8 import 'package:analyzer/src/error/codes.dart'; 8 import 'package:analyzer/src/error/codes.dart';
9 import 'package:analyzer/src/generated/engine.dart'; 9 import 'package:analyzer/src/generated/engine.dart';
10 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode; 10 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
11 import 'package:analyzer/src/generated/source_io.dart'; 11 import 'package:analyzer/src/generated/source_io.dart';
12 import 'package:test/test.dart' show expect;
12 import 'package:test_reflective_loader/test_reflective_loader.dart'; 13 import 'package:test_reflective_loader/test_reflective_loader.dart';
13 import 'package:unittest/unittest.dart' show expect;
14 14
15 import '../utils.dart'; 15 import '../utils.dart';
16 import 'resolver_test_case.dart'; 16 import 'resolver_test_case.dart';
17 17
18 main() { 18 main() {
19 initializeTestEnvironment(); 19 initializeTestEnvironment();
20 defineReflectiveTests(CompileTimeErrorCodeTest); 20 defineReflectiveSuite(() {
21 defineReflectiveTests(CompileTimeErrorCodeTest);
22 });
21 } 23 }
22 24
23 @reflectiveTest 25 @reflectiveTest
24 class CompileTimeErrorCodeTest extends ResolverTestCase { 26 class CompileTimeErrorCodeTest extends ResolverTestCase {
25 void fail_awaitInWrongContext_sync() { 27 void fail_awaitInWrongContext_sync() {
26 // This test requires better error recovery than we currently have. In 28 // This test requires better error recovery than we currently have. In
27 // particular, we need to be able to distinguish between an await expression 29 // particular, we need to be able to distinguish between an await expression
28 // in the wrong context, and the use of 'await' as an identifier. 30 // in the wrong context, and the use of 'await' as an identifier.
29 Source source = addSource(r''' 31 Source source = addSource(r'''
30 f(x) { 32 f(x) {
(...skipping 6368 matching lines...) Expand 10 before | Expand all | Expand 10 after
6399 source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR]); 6401 source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR]);
6400 verify([source]); 6402 verify([source]);
6401 reset(); 6403 reset();
6402 } 6404 }
6403 6405
6404 void _check_wrongNumberOfParametersForOperator1(String name) { 6406 void _check_wrongNumberOfParametersForOperator1(String name) {
6405 _check_wrongNumberOfParametersForOperator(name, ""); 6407 _check_wrongNumberOfParametersForOperator(name, "");
6406 _check_wrongNumberOfParametersForOperator(name, "a, b"); 6408 _check_wrongNumberOfParametersForOperator(name, "a, b");
6407 } 6409 }
6408 } 6410 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698