mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 22:00:09 +00:00
Move unittests, #12 of ?
Change-Id: I218d69ecdefc7580ab192eb1aa36a0f000427c92 Reviewed-on: https://dart-review.googlesource.com/31485 Reviewed-by: Sigmund Cherem <sigmund@google.com>
This commit is contained in:
parent
ed3fa76b42
commit
50c0c38a60
|
@ -67,15 +67,9 @@
|
|||
"^tests/compiler/dart2js/sourcemaps/stacktrace_test\\.dart",
|
||||
"^tests/compiler/dart2js/subtype_test\\.dart",
|
||||
"^tests/compiler/dart2js/subtypeset_test\\.dart",
|
||||
"^tests/compiler/dart2js/tdiv_test\\.dart",
|
||||
"^tests/compiler/dart2js/token_naming_test\\.dart",
|
||||
"^tests/compiler/dart2js/trust_type_annotations_test\\.dart",
|
||||
"^tests/compiler/dart2js/type_checker_test\\.dart",
|
||||
"^tests/compiler/dart2js/type_equals_test\\.dart",
|
||||
"^tests/compiler/dart2js/type_inference8_test\\.dart",
|
||||
"^tests/compiler/dart2js/type_mask2_test\\.dart",
|
||||
"^tests/compiler/dart2js/type_mask_test\\.dart",
|
||||
"^tests/compiler/dart2js/type_order_test\\.dart",
|
||||
"^tests/compiler/dart2js/inference/type_inference8_test\\.dart",
|
||||
"^tests/compiler/dart2js/inference/type_mask2_test\\.dart",
|
||||
"^tests/compiler/dart2js/type_representation_test\\.dart",
|
||||
"^tests/compiler/dart2js/type_substitution_test\\.dart",
|
||||
"^tests/compiler/dart2js/type_variable_occurrence_test\\.dart",
|
||||
|
|
|
@ -10,7 +10,7 @@ import 'package:compiler/src/elements/entities.dart';
|
|||
import 'package:compiler/src/js_backend/annotations.dart' as optimizerHints;
|
||||
import 'package:compiler/src/types/types.dart';
|
||||
import 'package:compiler/src/world.dart' show ClosedWorld;
|
||||
import '../type_mask_test_helper.dart';
|
||||
import '../inference/type_mask_test_helper.dart';
|
||||
import '../memory_compiler.dart';
|
||||
|
||||
const Map MEMORY_SOURCE_FILES = const {
|
||||
|
|
|
@ -6,7 +6,7 @@ library tdiv_test;
|
|||
|
||||
import 'dart:async';
|
||||
import 'package:async_helper/async_helper.dart';
|
||||
import 'compiler_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
|
||||
const String TEST1 = r"""
|
||||
foo(param) {
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
import 'package:expect/expect.dart';
|
||||
import 'package:async_helper/async_helper.dart';
|
||||
import 'compiler_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
|
||||
const String TEST_ONE = r"""
|
||||
main() {
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
import "package:expect/expect.dart";
|
||||
import "package:async_helper/async_helper.dart";
|
||||
import 'compiler_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
|
||||
const String TEST = r"""
|
||||
class A {
|
|
@ -5,7 +5,7 @@
|
|||
import 'package:expect/expect.dart';
|
||||
import "package:async_helper/async_helper.dart";
|
||||
import 'package:compiler/src/commandline_options.dart';
|
||||
import 'memory_compiler.dart';
|
||||
import '../memory_compiler.dart';
|
||||
|
||||
const MEMORY_SOURCE_FILES = const {
|
||||
'main.dart': '''
|
|
@ -6,8 +6,8 @@ import 'package:expect/expect.dart';
|
|||
import "package:async_helper/async_helper.dart";
|
||||
import 'package:compiler/src/commandline_options.dart';
|
||||
import 'package:compiler/src/elements/entities.dart';
|
||||
import 'compiler_helper.dart';
|
||||
import 'memory_compiler.dart';
|
||||
import '../compiler_helper.dart';
|
||||
import '../memory_compiler.dart';
|
||||
|
||||
const String TEST = """
|
||||
class A {
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
import 'package:expect/expect.dart';
|
||||
import 'package:async_helper/async_helper.dart';
|
||||
import 'compiler_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
|
||||
const String TEST_ONE = r"""
|
||||
foo(a) {
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
import 'package:async_helper/async_helper.dart';
|
||||
import 'compiler_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
|
||||
const String TEST_ONE = r"""
|
||||
sum(param0, param1) {
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
import 'package:expect/expect.dart';
|
||||
import 'package:async_helper/async_helper.dart';
|
||||
import 'compiler_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
|
||||
const String TEST_ONE = r"""
|
||||
sum(param0, param1) {
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
import 'package:expect/expect.dart';
|
||||
import 'package:async_helper/async_helper.dart';
|
||||
import 'compiler_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
|
||||
const String TEST_ONE = r"""
|
||||
foo(j) {
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
import 'package:expect/expect.dart';
|
||||
import 'package:async_helper/async_helper.dart';
|
||||
import 'compiler_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
|
||||
const String TEST_ONE = r"""
|
||||
foo(j) {
|
|
@ -11,8 +11,8 @@ import 'package:compiler/src/elements/elements.dart';
|
|||
import 'package:compiler/src/types/masks.dart';
|
||||
import 'package:compiler/src/world.dart' show ClosedWorld;
|
||||
import 'package:expect/expect.dart';
|
||||
import 'type_mask_test_helper.dart';
|
||||
import '../memory_compiler.dart';
|
||||
import '../type_mask_test_helper.dart';
|
||||
|
||||
const String SOURCE = '''
|
||||
main(args) {
|
||||
|
|
|
@ -10,8 +10,8 @@ import 'package:compiler/src/elements/elements.dart';
|
|||
import 'package:compiler/src/types/masks.dart';
|
||||
import 'package:expect/expect.dart';
|
||||
|
||||
import 'type_mask_test_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
import '../type_mask_test_helper.dart';
|
||||
|
||||
void compileAndFind(String code, String className, String memberName,
|
||||
bool disableInlining, check(compiler, element)) {
|
||||
|
|
|
@ -14,8 +14,8 @@ import 'package:compiler/src/types/types.dart';
|
|||
import 'package:compiler/src/world.dart';
|
||||
import 'package:expect/expect.dart';
|
||||
|
||||
import 'type_mask_test_helper.dart';
|
||||
import '../memory_compiler.dart';
|
||||
import '../type_mask_test_helper.dart';
|
||||
|
||||
bool isContainer(TypeMask mask) {
|
||||
return mask is ContainerTypeMask;
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
import 'package:expect/expect.dart';
|
||||
import "package:async_helper/async_helper.dart";
|
||||
|
||||
import 'type_mask_test_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
import '../type_mask_test_helper.dart';
|
||||
|
||||
const String TEST = '''
|
||||
testFunctionStatement() {
|
||||
|
|
|
@ -10,8 +10,8 @@ import 'package:async_helper/async_helper.dart';
|
|||
import 'package:compiler/src/types/types.dart' show TypeMask;
|
||||
import 'package:compiler/src/world.dart' show ClosedWorld;
|
||||
|
||||
import 'type_mask_test_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
import '../type_mask_test_helper.dart';
|
||||
|
||||
void compileAndFind(String code, String className, String memberName,
|
||||
bool disableInlining, check(compiler, element)) {
|
||||
|
|
|
@ -8,8 +8,8 @@ import 'package:async_helper/async_helper.dart';
|
|||
import 'package:compiler/src/commandline_options.dart';
|
||||
import 'package:compiler/src/elements/entities.dart';
|
||||
import 'package:expect/expect.dart';
|
||||
import 'type_mask_test_helper.dart';
|
||||
import '../memory_compiler.dart';
|
||||
import '../type_mask_test_helper.dart';
|
||||
|
||||
const String TEST = """
|
||||
bar() => 42;
|
||||
|
|
|
@ -12,8 +12,8 @@ import 'package:compiler/src/commandline_options.dart';
|
|||
import 'package:compiler/src/elements/entities.dart';
|
||||
import 'package:compiler/src/types/types.dart' show ContainerTypeMask;
|
||||
import 'package:expect/expect.dart';
|
||||
import 'type_mask_test_helper.dart';
|
||||
import '../memory_compiler.dart';
|
||||
import '../type_mask_test_helper.dart';
|
||||
|
||||
const String TEST = r'''
|
||||
var myList = [42];
|
||||
|
|
|
@ -12,8 +12,8 @@ import 'package:expect/expect.dart';
|
|||
import "package:async_helper/async_helper.dart";
|
||||
import 'package:compiler/src/types/types.dart' show ContainerTypeMask;
|
||||
|
||||
import 'type_mask_test_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
import '../type_mask_test_helper.dart';
|
||||
|
||||
const String TEST = r'''
|
||||
var myList = [];
|
||||
|
|
|
@ -9,8 +9,8 @@ import 'package:expect/expect.dart';
|
|||
import "package:async_helper/async_helper.dart";
|
||||
import 'package:compiler/src/types/types.dart' show ContainerTypeMask, TypeMask;
|
||||
|
||||
import 'type_mask_test_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
import '../type_mask_test_helper.dart';
|
||||
|
||||
String generateTest(String listAllocation) {
|
||||
return """
|
||||
|
|
|
@ -9,8 +9,8 @@ import 'package:compiler/src/commandline_options.dart';
|
|||
import 'package:compiler/src/elements/entities.dart';
|
||||
import 'package:compiler/src/types/types.dart' show TypeMask, ContainerTypeMask;
|
||||
import 'package:expect/expect.dart';
|
||||
import 'type_mask_test_helper.dart';
|
||||
import '../memory_compiler.dart';
|
||||
import '../type_mask_test_helper.dart';
|
||||
|
||||
const TEST = const {
|
||||
'main.dart': r'''
|
||||
|
|
|
@ -8,8 +8,8 @@ import 'package:async_helper/async_helper.dart';
|
|||
import 'package:compiler/src/commandline_options.dart';
|
||||
import 'package:compiler/src/elements/entities.dart';
|
||||
import 'package:expect/expect.dart';
|
||||
import 'type_mask_test_helper.dart';
|
||||
import '../memory_compiler.dart';
|
||||
import '../type_mask_test_helper.dart';
|
||||
|
||||
const String TEST = '''
|
||||
int closure(int x) {
|
||||
|
|
|
@ -9,8 +9,8 @@ import 'package:expect/expect.dart';
|
|||
import "package:async_helper/async_helper.dart";
|
||||
import 'package:compiler/src/types/types.dart' show MapTypeMask, TypeMask;
|
||||
|
||||
import 'type_mask_test_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
import '../type_mask_test_helper.dart';
|
||||
|
||||
String generateTest(String mapAllocation) {
|
||||
return """
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
import 'package:expect/expect.dart';
|
||||
import "package:async_helper/async_helper.dart";
|
||||
import 'type_mask_test_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
import '../type_mask_test_helper.dart';
|
||||
|
||||
const String TEST = """
|
||||
class X {}
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
import 'package:expect/expect.dart';
|
||||
import "package:async_helper/async_helper.dart";
|
||||
import 'type_mask_test_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
import '../type_mask_test_helper.dart';
|
||||
|
||||
const String TEST = """
|
||||
returnInt1() {
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
import 'package:expect/expect.dart';
|
||||
import "package:async_helper/async_helper.dart";
|
||||
import 'type_mask_test_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
import '../type_mask_test_helper.dart';
|
||||
|
||||
const String TEST = """
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
import 'package:expect/expect.dart';
|
||||
import "package:async_helper/async_helper.dart";
|
||||
import 'type_mask_test_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
import '../type_mask_test_helper.dart';
|
||||
|
||||
const String TEST = """
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
import 'package:expect/expect.dart';
|
||||
import "package:async_helper/async_helper.dart";
|
||||
import 'type_mask_test_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
import '../type_mask_test_helper.dart';
|
||||
|
||||
const String TEST = """
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
import 'package:expect/expect.dart';
|
||||
import "package:async_helper/async_helper.dart";
|
||||
import 'type_mask_test_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
import '../type_mask_test_helper.dart';
|
||||
|
||||
const String TEST = """
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
|
||||
import 'package:expect/expect.dart';
|
||||
import "package:async_helper/async_helper.dart";
|
||||
import 'type_mask_test_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
import '../type_mask_test_helper.dart';
|
||||
|
||||
const String TEST = """
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
import 'package:async_helper/async_helper.dart';
|
||||
import 'package:expect/expect.dart';
|
||||
|
||||
import 'type_mask_test_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
import '../type_mask_test_helper.dart';
|
||||
|
||||
const String TEST = """
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
import 'package:expect/expect.dart';
|
||||
import "package:async_helper/async_helper.dart";
|
||||
import 'type_mask_test_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
import '../type_mask_test_helper.dart';
|
||||
|
||||
const String TEST = """
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
|
||||
import 'package:expect/expect.dart';
|
||||
|
||||
import "package:async_helper/async_helper.dart";
|
||||
import '../compiler_helper.dart';
|
||||
import 'package:async_helper/async_helper.dart';
|
||||
import 'package:compiler/src/types/types.dart';
|
||||
import '../type_mask_test_helper.dart';
|
||||
import 'type_mask_test_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
|
||||
const String TEST1 = """
|
||||
class A {
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
import 'package:async_helper/async_helper.dart';
|
||||
import 'package:expect/expect.dart';
|
||||
|
||||
import 'type_mask_test_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
import '../type_mask_test_helper.dart';
|
||||
|
||||
const String TEST = """
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
import 'package:expect/expect.dart';
|
||||
import "package:async_helper/async_helper.dart";
|
||||
import 'package:compiler/src/types/types.dart' show TypeMask;
|
||||
import '../type_mask_test_helper.dart';
|
||||
|
||||
import 'type_mask_test_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
|
||||
const String TEST = """
|
||||
|
|
|
@ -8,8 +8,8 @@ import 'package:expect/expect.dart';
|
|||
import "package:async_helper/async_helper.dart";
|
||||
import 'package:compiler/src/types/types.dart' show TypeMask;
|
||||
|
||||
import 'type_mask_test_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
import '../type_mask_test_helper.dart';
|
||||
|
||||
const String TEST = """
|
||||
returnInt1() {
|
||||
|
|
|
@ -12,7 +12,7 @@ import 'package:compiler/src/types/types.dart';
|
|||
import 'package:compiler/src/world.dart';
|
||||
import 'package:compiler/src/universe/use.dart';
|
||||
import 'package:compiler/src/universe/world_impact.dart';
|
||||
import 'compiler_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
import 'type_mask_test_helper.dart';
|
||||
|
||||
TypeMask nullType;
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import "package:async_helper/async_helper.dart";
|
||||
import "package:expect/expect.dart";
|
||||
import 'compiler_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
import 'type_mask_test_helper.dart';
|
||||
|
||||
import 'dart:async';
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import "package:async_helper/async_helper.dart";
|
||||
import "package:expect/expect.dart";
|
||||
import 'compiler_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
import 'type_mask_test_helper.dart';
|
||||
import 'dart:async';
|
||||
|
|
@ -8,7 +8,7 @@ import "package:async_helper/async_helper.dart";
|
|||
import "package:compiler/src/constants/values.dart";
|
||||
import "package:compiler/src/types/types.dart";
|
||||
import "package:expect/expect.dart";
|
||||
import 'compiler_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
|
||||
import 'dart:async';
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import "package:async_helper/async_helper.dart";
|
||||
import "package:expect/expect.dart";
|
||||
import 'compiler_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
import 'type_mask_test_helper.dart';
|
||||
|
||||
import 'dart:async';
|
|
@ -7,10 +7,10 @@ library type_mask2_test;
|
|||
import 'dart:async';
|
||||
import 'package:expect/expect.dart';
|
||||
import 'package:async_helper/async_helper.dart';
|
||||
import 'type_test_helper.dart';
|
||||
import 'package:compiler/src/elements/entities.dart';
|
||||
import 'package:compiler/src/types/types.dart';
|
||||
import 'package:compiler/src/world.dart' show ClosedWorld;
|
||||
import '../type_test_helper.dart';
|
||||
|
||||
isCheckedMode() {
|
||||
try {
|
|
@ -11,7 +11,7 @@ import 'package:compiler/src/elements/entities.dart';
|
|||
import 'package:compiler/src/types/types.dart';
|
||||
import 'package:compiler/src/world.dart';
|
||||
|
||||
import 'memory_compiler.dart';
|
||||
import '../memory_compiler.dart';
|
||||
|
||||
const String CODE = """
|
||||
class A {}
|
|
@ -10,7 +10,7 @@ import 'package:compiler/src/commandline_options.dart';
|
|||
import 'package:compiler/src/common_elements.dart';
|
||||
import 'package:compiler/src/compiler.dart';
|
||||
import 'package:compiler/src/world.dart';
|
||||
import 'memory_compiler.dart';
|
||||
import '../memory_compiler.dart';
|
||||
|
||||
const String CODE = """
|
||||
class A {}
|
|
@ -8,7 +8,7 @@ import 'package:expect/expect.dart';
|
|||
import "package:async_helper/async_helper.dart";
|
||||
import '../memory_compiler.dart' show runCompiler;
|
||||
import '../compiler_helper.dart' show findElement;
|
||||
import '../type_mask_test_helper.dart';
|
||||
import '../inference/type_mask_test_helper.dart';
|
||||
|
||||
const MEMORY_SOURCE_FILES = const <String, String>{
|
||||
'main.dart': """
|
||||
|
|
|
@ -8,7 +8,7 @@ import 'package:expect/expect.dart';
|
|||
import "package:async_helper/async_helper.dart";
|
||||
import '../memory_compiler.dart' show runCompiler;
|
||||
import '../compiler_helper.dart' show findElement;
|
||||
import '../type_mask_test_helper.dart';
|
||||
import '../inference/type_mask_test_helper.dart';
|
||||
|
||||
const MEMORY_SOURCE_FILES = const <String, String>{
|
||||
'main.dart': """
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import 'package:expect/expect.dart';
|
||||
import "package:async_helper/async_helper.dart";
|
||||
import 'compiler_helper.dart';
|
||||
import '../compiler_helper.dart';
|
||||
|
||||
const MAIN_CODE = """
|
||||
import 'library.dart';
|
|
@ -21,8 +21,8 @@ import 'package:compiler/src/typechecker.dart';
|
|||
import 'package:compiler/src/script.dart';
|
||||
import 'package:compiler/src/util/util.dart';
|
||||
|
||||
import 'old_frontend/mock_compiler.dart';
|
||||
import 'old_frontend/parser_helper.dart';
|
||||
import 'mock_compiler.dart';
|
||||
import 'parser_helper.dart';
|
||||
|
||||
final MessageKind NOT_ASSIGNABLE = MessageKind.NOT_ASSIGNABLE;
|
||||
final MessageKind UNDEFINED_GETTER = MessageKind.UNDEFINED_GETTER;
|
|
@ -5,7 +5,7 @@
|
|||
import "package:expect/expect.dart";
|
||||
import "package:async_helper/async_helper.dart";
|
||||
import 'package:compiler/src/elements/resolution_types.dart';
|
||||
import "compiler_helper.dart";
|
||||
import "../compiler_helper.dart";
|
||||
|
||||
test(compiler, String name1, String name2, {bool expect}) {
|
||||
Expect.isTrue((expect != null), 'required parameter "expect" not given');
|
|
@ -6,7 +6,7 @@ library type_order_test;
|
|||
|
||||
import 'package:expect/expect.dart';
|
||||
import 'package:async_helper/async_helper.dart';
|
||||
import 'type_test_helper.dart';
|
||||
import '../type_test_helper.dart';
|
||||
import 'package:compiler/src/elements/resolution_types.dart';
|
||||
import "package:compiler/src/elements/elements.dart"
|
||||
show ClassElement, TypedefElement;
|
|
@ -6,7 +6,7 @@
|
|||
// promotion language tests. This ensures that the analyzer and dart2js agrees
|
||||
// on these tests.
|
||||
|
||||
import 'warnings_checker.dart';
|
||||
import '../warnings_checker.dart';
|
||||
|
||||
/// Map from test files to a map of their expected status. If the status map is
|
||||
/// `null` no warnings must be missing or unexpected, otherwise the status map
|
Loading…
Reference in a new issue