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

Unified Diff: pkg/analyzer/test/generated/compile_time_error_code_test.dart

Issue 1266923004: More fixes for failures on the Windows bot (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/test/generated/ast_test.dart ('k') | pkg/analyzer/test/generated/element_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/compile_time_error_code_test.dart
diff --git a/pkg/analyzer/test/generated/compile_time_error_code_test.dart b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
index 29e0b671968a16cbd1ea281f63bb96cad50ae426..2028e70a038534e5887dd66b1d18cfca96545ccf 100644
--- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
+++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
@@ -7,13 +7,13 @@ library engine.compile_time_error_code_test;
import 'package:analyzer/src/generated/error.dart';
import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
import 'package:analyzer/src/generated/source_io.dart';
-import 'package:unittest/unittest.dart' as _ut;
import '../reflective_tests.dart';
+import '../utils.dart';
import 'resolver_test.dart';
main() {
- _ut.groupSep = ' | ';
+ initializeTestEnvironment();
runReflectiveTests(CompileTimeErrorCodeTest);
}
@@ -207,10 +207,14 @@ String name(E e) {
library L;
export 'lib1.dart';
export 'lib2.dart';''');
- addNamedSource("/lib1.dart", r'''
+ addNamedSource(
+ "/lib1.dart",
+ r'''
library lib1;
class N {}''');
- addNamedSource("/lib2.dart", r'''
+ addNamedSource(
+ "/lib2.dart",
+ r'''
library lib2;
class N {}''');
computeLibrarySourceErrors(source);
@@ -471,7 +475,9 @@ f() async {
}
void test_async_used_as_identifier_in_suffix() {
- addNamedSource("/lib1.dart", r'''
+ addNamedSource(
+ "/lib1.dart",
+ r'''
library lib1;
int async;
''');
@@ -955,7 +961,9 @@ import 'lib1.dart' deferred as a;
main() {
const a.A();
}'''
- ], <ErrorCode>[CompileTimeErrorCode.CONST_DEFERRED_CLASS]);
+ ], <ErrorCode>[
+ CompileTimeErrorCode.CONST_DEFERRED_CLASS
+ ]);
}
void test_constDeferredClass_namedConstructor() {
@@ -971,7 +979,9 @@ import 'lib1.dart' deferred as a;
main() {
const a.A.b();
}'''
- ], <ErrorCode>[CompileTimeErrorCode.CONST_DEFERRED_CLASS]);
+ ], <ErrorCode>[
+ CompileTimeErrorCode.CONST_DEFERRED_CLASS
+ ]);
}
void test_constEval_newInstance_constConstructor() {
@@ -1411,8 +1421,10 @@ f() {
}
void test_constWithNonType_fromLibrary() {
- Source source1 = addNamedSource("lib.dart", "");
- Source source2 = addNamedSource("lib2.dart", r'''
+ Source source1 = addNamedSource("/lib.dart", "");
+ Source source2 = addNamedSource(
+ "/lib2.dart",
+ r'''
import 'lib.dart' as lib;
void f() {
const lib.A();
@@ -1548,16 +1560,22 @@ class A {
}
void test_duplicateDefinition_acrossLibraries() {
- Source librarySource = addNamedSource("/lib.dart", r'''
+ Source librarySource = addNamedSource(
+ "/lib.dart",
+ r'''
library lib;
part 'a.dart';
part 'b.dart';''');
- Source sourceA = addNamedSource("/a.dart", r'''
+ Source sourceA = addNamedSource(
+ "/a.dart",
+ r'''
part of lib;
class A {}''');
- Source sourceB = addNamedSource("/b.dart", r'''
+ Source sourceB = addNamedSource(
+ "/b.dart",
+ r'''
part of lib;
class A {}''');
@@ -1830,7 +1848,9 @@ class A {}''',
library root;
import 'lib1.dart' deferred as a;
class B extends a.A {}'''
- ], <ErrorCode>[CompileTimeErrorCode.EXTENDS_DEFERRED_CLASS]);
+ ], <ErrorCode>[
+ CompileTimeErrorCode.EXTENDS_DEFERRED_CLASS
+ ]);
}
void test_extendsDeferredClass_classTypeAlias() {
@@ -1843,7 +1863,9 @@ library root;
import 'lib1.dart' deferred as a;
class M {}
class C = a.A with M;'''
- ], <ErrorCode>[CompileTimeErrorCode.EXTENDS_DEFERRED_CLASS]);
+ ], <ErrorCode>[
+ CompileTimeErrorCode.EXTENDS_DEFERRED_CLASS
+ ]);
}
void test_extendsDisallowedClass_class_bool() {
@@ -2262,7 +2284,9 @@ class A {}''',
library root;
import 'lib1.dart' deferred as a;
class B implements a.A {}'''
- ], <ErrorCode>[CompileTimeErrorCode.IMPLEMENTS_DEFERRED_CLASS]);
+ ], <ErrorCode>[
+ CompileTimeErrorCode.IMPLEMENTS_DEFERRED_CLASS
+ ]);
}
void test_implementsDeferredClass_classTypeAlias() {
@@ -2276,7 +2300,9 @@ import 'lib1.dart' deferred as a;
class B {}
class M {}
class C = B with M implements a.A;'''
- ], <ErrorCode>[CompileTimeErrorCode.IMPLEMENTS_DEFERRED_CLASS]);
+ ], <ErrorCode>[
+ CompileTimeErrorCode.IMPLEMENTS_DEFERRED_CLASS
+ ]);
}
void test_implementsDisallowedClass_class_bool() {
@@ -2564,10 +2590,8 @@ class B extends A {
// directive for the error, this is such a minor corner case that we don't
// think we should add the additional computation time to figure out such
// cases.
- assertErrors(source, [
- CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY,
- HintCode.UNUSED_IMPORT
- ]);
+ assertErrors(source,
+ [CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY, HintCode.UNUSED_IMPORT]);
verify([source]);
}
@@ -2579,10 +2603,8 @@ class B extends A {
// directive for the error, this is such a minor corner case that we don't
// think we should add the additional computation time to figure out such
// cases.
- assertErrors(source, [
- CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY,
- HintCode.UNUSED_IMPORT
- ]);
+ assertErrors(source,
+ [CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY, HintCode.UNUSED_IMPORT]);
verify([source]);
}
@@ -2591,7 +2613,9 @@ class B extends A {
library lib;
import 'part.dart';
A a;''');
- addNamedSource("/part.dart", r'''
+ addNamedSource(
+ "/part.dart",
+ r'''
part of lib;
class A{}''');
computeLibrarySourceErrors(source);
@@ -2865,7 +2889,9 @@ main() {
}
void test_invalidAnnotation_importWithPrefix_getter() {
- addNamedSource("/lib.dart", r'''
+ addNamedSource(
+ "/lib.dart",
+ r'''
library lib;
get V => 0;''');
Source source = addSource(r'''
@@ -2879,7 +2905,9 @@ main() {
}
void test_invalidAnnotation_importWithPrefix_notConstantVariable() {
- addNamedSource("/lib.dart", r'''
+ addNamedSource(
+ "/lib.dart",
+ r'''
library lib;
final V = 0;''');
Source source = addSource(r'''
@@ -2893,7 +2921,9 @@ main() {
}
void test_invalidAnnotation_importWithPrefix_notVariableOrConstructorInvocation() {
- addNamedSource("/lib.dart", r'''
+ addNamedSource(
+ "/lib.dart",
+ r'''
library lib;
typedef V();''');
Source source = addSource(r'''
@@ -3464,7 +3494,9 @@ class A {}''',
library root;
import 'lib1.dart' deferred as a;
class B extends Object with a.A {}'''
- ], <ErrorCode>[CompileTimeErrorCode.MIXIN_DEFERRED_CLASS]);
+ ], <ErrorCode>[
+ CompileTimeErrorCode.MIXIN_DEFERRED_CLASS
+ ]);
}
void test_mixinDeferredClass_classTypeAlias() {
@@ -3477,7 +3509,9 @@ library root;
import 'lib1.dart' deferred as a;
class B {}
class C = B with a.A;'''
- ], <ErrorCode>[CompileTimeErrorCode.MIXIN_DEFERRED_CLASS]);
+ ], <ErrorCode>[
+ CompileTimeErrorCode.MIXIN_DEFERRED_CLASS
+ ]);
}
void test_mixinHasNoConstructors_mixinApp() {
@@ -4756,7 +4790,9 @@ f() {
}
void test_prefix_conditionalPropertyAccess_call() {
- addNamedSource('/lib.dart', '''
+ addNamedSource(
+ '/lib.dart',
+ '''
library lib;
g() {}
''');
@@ -4773,7 +4809,9 @@ f() {
}
void test_prefix_conditionalPropertyAccess_call_loadLibrary() {
- addNamedSource('/lib.dart', '''
+ addNamedSource(
+ '/lib.dart',
+ '''
library lib;
''');
Source source = addSource('''
@@ -4789,7 +4827,9 @@ f() {
}
void test_prefix_conditionalPropertyAccess_get() {
- addNamedSource('/lib.dart', '''
+ addNamedSource(
+ '/lib.dart',
+ '''
library lib;
var x;
''');
@@ -4806,7 +4846,9 @@ f() {
}
void test_prefix_conditionalPropertyAccess_get_loadLibrary() {
- addNamedSource('/lib.dart', '''
+ addNamedSource(
+ '/lib.dart',
+ '''
library lib;
''');
Source source = addSource('''
@@ -4822,7 +4864,9 @@ f() {
}
void test_prefix_conditionalPropertyAccess_set() {
- addNamedSource('/lib.dart', '''
+ addNamedSource(
+ '/lib.dart',
+ '''
library lib;
var x;
''');
@@ -4839,7 +4883,9 @@ f() {
}
void test_prefix_conditionalPropertyAccess_set_loadLibrary() {
- addNamedSource('/lib.dart', '''
+ addNamedSource(
+ '/lib.dart',
+ '''
library lib;
''');
Source source = addSource('''
@@ -4885,7 +4931,9 @@ f() {
}
void test_prefixCollidesWithTopLevelMembers_functionTypeAlias() {
- addNamedSource("/lib.dart", r'''
+ addNamedSource(
+ "/lib.dart",
+ r'''
library lib;
class A{}''');
Source source = addSource(r'''
@@ -4899,7 +4947,9 @@ p.A a;''');
}
void test_prefixCollidesWithTopLevelMembers_topLevelFunction() {
- addNamedSource("/lib.dart", r'''
+ addNamedSource(
+ "/lib.dart",
+ r'''
library lib;
class A{}''');
Source source = addSource(r'''
@@ -4913,7 +4963,9 @@ p.A a;''');
}
void test_prefixCollidesWithTopLevelMembers_topLevelVariable() {
- addNamedSource("/lib.dart", r'''
+ addNamedSource(
+ "/lib.dart",
+ r'''
library lib;
class A{}''');
Source source = addSource(r'''
@@ -4927,7 +4979,9 @@ p.A a;''');
}
void test_prefixCollidesWithTopLevelMembers_type() {
- addNamedSource("/lib.dart", r'''
+ addNamedSource(
+ "/lib.dart",
+ r'''
library lib;
class A{}''');
Source source = addSource(r'''
@@ -4969,7 +5023,9 @@ f() {
}
void test_prefixNotFollowedByDot_conditionalMethodInvocation() {
- addNamedSource('/lib.dart', '''
+ addNamedSource(
+ '/lib.dart',
+ '''
library lib;
g() {}
''');
@@ -5547,7 +5603,9 @@ library root;
import 'lib1.dart' deferred as lib;
import 'lib2.dart' as lib;
main() { lib.f1(); lib.f2(); }'''
- ], <ErrorCode>[CompileTimeErrorCode.SHARED_DEFERRED_PREFIX]);
+ ], <ErrorCode>[
+ CompileTimeErrorCode.SHARED_DEFERRED_PREFIX
+ ]);
}
void test_superInInvalidContext_binaryExpression() {
« no previous file with comments | « pkg/analyzer/test/generated/ast_test.dart ('k') | pkg/analyzer/test/generated/element_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698