From fe7c2acd4e48b3c2777dfb806f0e446ccebfbfa0 Mon Sep 17 00:00:00 2001 From: Janice Collins Date: Wed, 30 Aug 2017 08:05:05 -0700 Subject: [PATCH] Migrate block 163 to Dart 2.0. Interesting tests requiring status file or other changes: type_variable_promotion_test type_variable_scope_test type_variable_static_context_negative_test - changed from negative to compile-time error unresolved_top_level_method_negative_test - changed from negative to compile-time error unary_plus_negative_test unhandled_exception_negative_test unbound_getter_test unresolved_in_factory_negative_test - unresolved_top_level_var_negative_test - changed from negative to compile-time error unresolved_top_level_method_negative_test - changed from negative to compile-time error vm/async_await_catch_stacktrace_test BUG= R=lrn@google.com Review-Url: https://codereview.chromium.org/3008723002 . --- tests/language/language.status | 10 -- tests/language/language_analyzer2.status | 10 -- tests/language/language_dart2js.status | 3 +- tests/language/type_variable_scope2_test.dart | 25 ---- ...variable_static_context_negative_test.dart | 16 --- tests/language/unary_plus_negative_test.dart | 10 -- tests/language/unbound_getter_test.dart | 29 ---- .../unhandled_exception_negative_test.dart | 30 ----- .../unresolved_default_constructor_test.dart | 18 --- ...solved_top_level_method_negative_test.dart | 12 -- tests/language_2/language_2_analyzer.status | 16 +++ tests/language_2/language_2_dart2js.status | 23 ++++ tests/language_2/language_2_dartdevc.status | 7 +- tests/language_2/language_2_flutter.status | 9 ++ .../language_2/language_2_precompiled.status | 17 +++ tests/language_2/language_2_vm.status | 16 +++ .../type_variable_nested_test.dart | 2 +- .../type_variable_promotion_test.dart | 4 +- .../type_variable_scope2_test.dart} | 20 +-- .../type_variable_scope3_test.dart | 0 .../type_variable_scope_test.dart | 12 +- .../type_variable_static_context_test.dart} | 3 +- .../type_variable_typedef_test.dart | 0 ...typecheck_multifield_declaration_test.dart | 0 .../typed_equality_test.dart | 0 .../typed_selector2_test.dart | 2 +- .../typed_selector_test.dart | 0 .../typedef_is_test.dart | 0 .../{language => language_2}/unary2_test.dart | 0 .../unary_plus_negative_test.dart | 2 +- .../{language => language_2}/unary_test.dart | 0 .../unbalanced_brace_test.dart | 0 .../unbound_getter_test.dart} | 11 +- .../unconditional_break.dart | 0 .../unhandled_exception_negative_test.dart | 2 +- .../unicode_bom_middle_test.dart | 0 .../unicode_bom_test.dart | 0 .../unicode_hash_test.dart | 0 .../unnamed_closure_test.dart | 0 .../unqual_name_test.dart | 0 .../unresolved_default_constructor_test.dart | 5 +- .../unresolved_in_factory_test.dart} | 5 +- .../unresolved_top_level_method_test.dart} | 6 +- .../unresolved_top_level_var_test.dart} | 8 +- .../unsigned_right_shift_test.dart | 0 .../unsupported_operators_test.dart | 0 .../unused_overridden_async_test.dart | 2 - .../value_range2_test.dart | 0 .../value_range3_test.dart | 0 .../value_range_test.dart | 0 .../var_init_test.dart | 0 .../variable_declaration_metadata_test.dart | 0 .../variable_named_dart_test.dart | 0 .../vm/allocation_sinking_vm_test.dart | 0 .../vm/async_await_catch_stacktrace_test.dart | 0 tests/language_strong/language_strong.status | 17 --- .../type_variable_nested_test.dart | 32 ----- .../type_variable_scope2_test.dart | 25 ---- .../type_variable_scope3_test.dart | 17 --- .../type_variable_scope_test.dart | 48 ------- .../type_variable_typedef_test.dart | 30 ----- .../language_strong/typed_equality_test.dart | 21 --- .../language_strong/typed_selector2_test.dart | 22 --- .../language_strong/typed_selector_test.dart | 30 ----- tests/language_strong/typedef_is_test.dart | 125 ------------------ tests/language_strong/unary2_test.dart | 24 ---- tests/language_strong/unary_test.dart | 25 ---- .../unbalanced_brace_test.dart | 22 --- .../language_strong/unbound_getter_test.dart | 29 ---- .../language_strong/unconditional_break.dart | 16 --- .../unicode_bom_middle_test.dart | 17 --- tests/language_strong/unicode_bom_test.dart | 11 -- tests/language_strong/unicode_hash_test.dart | 10 -- tests/language_strong/unqual_name_test.dart | 40 ------ ...nresolved_top_level_var_negative_test.dart | 12 -- .../unsigned_right_shift_test.dart | 12 -- .../unsupported_operators_test.dart | 29 ---- tests/language_strong/value_range2_test.dart | 22 --- tests/language_strong/value_range3_test.dart | 18 --- tests/language_strong/value_range_test.dart | 20 --- tests/language_strong/var_init_test.dart | 20 --- .../variable_declaration_metadata_test.dart | 86 ------------ 82 files changed, 123 insertions(+), 992 deletions(-) delete mode 100644 tests/language/type_variable_scope2_test.dart delete mode 100644 tests/language/type_variable_static_context_negative_test.dart delete mode 100644 tests/language/unary_plus_negative_test.dart delete mode 100644 tests/language/unbound_getter_test.dart delete mode 100644 tests/language/unhandled_exception_negative_test.dart delete mode 100644 tests/language/unresolved_default_constructor_test.dart delete mode 100644 tests/language/unresolved_top_level_method_negative_test.dart rename tests/{language => language_2}/type_variable_nested_test.dart (93%) rename tests/{language_strong => language_2}/type_variable_promotion_test.dart (89%) rename tests/{language_strong/unnamed_closure_test.dart => language_2/type_variable_scope2_test.dart} (54%) rename tests/{language => language_2}/type_variable_scope3_test.dart (100%) rename tests/{language => language_2}/type_variable_scope_test.dart (74%) rename tests/{language_strong/type_variable_static_context_negative_test.dart => language_2/type_variable_static_context_test.dart} (75%) rename tests/{language => language_2}/type_variable_typedef_test.dart (100%) rename tests/{language => language_2}/typecheck_multifield_declaration_test.dart (100%) rename tests/{language => language_2}/typed_equality_test.dart (100%) rename tests/{language => language_2}/typed_selector2_test.dart (92%) rename tests/{language => language_2}/typed_selector_test.dart (100%) rename tests/{language => language_2}/typedef_is_test.dart (100%) rename tests/{language => language_2}/unary2_test.dart (100%) rename tests/{language_strong => language_2}/unary_plus_negative_test.dart (86%) rename tests/{language => language_2}/unary_test.dart (100%) rename tests/{language => language_2}/unbalanced_brace_test.dart (100%) rename tests/{language_strong/unresolved_in_factory_negative_test.dart => language_2/unbound_getter_test.dart} (61%) rename tests/{language => language_2}/unconditional_break.dart (100%) rename tests/{language_strong => language_2}/unhandled_exception_negative_test.dart (91%) rename tests/{language => language_2}/unicode_bom_middle_test.dart (100%) rename tests/{language => language_2}/unicode_bom_test.dart (100%) rename tests/{language => language_2}/unicode_hash_test.dart (100%) rename tests/{language => language_2}/unnamed_closure_test.dart (100%) rename tests/{language => language_2}/unqual_name_test.dart (100%) rename tests/{language_strong => language_2}/unresolved_default_constructor_test.dart (67%) rename tests/{language/unresolved_in_factory_negative_test.dart => language_2/unresolved_in_factory_test.dart} (70%) rename tests/{language/unresolved_top_level_var_negative_test.dart => language_2/unresolved_top_level_method_test.dart} (64%) rename tests/{language_strong/unresolved_top_level_method_negative_test.dart => language_2/unresolved_top_level_var_test.dart} (64%) rename tests/{language => language_2}/unsigned_right_shift_test.dart (100%) rename tests/{language => language_2}/unsupported_operators_test.dart (100%) rename tests/{language_strong => language_2}/unused_overridden_async_test.dart (96%) rename tests/{language => language_2}/value_range2_test.dart (100%) rename tests/{language => language_2}/value_range3_test.dart (100%) rename tests/{language => language_2}/value_range_test.dart (100%) rename tests/{language => language_2}/var_init_test.dart (100%) rename tests/{language => language_2}/variable_declaration_metadata_test.dart (100%) rename tests/{language_strong => language_2}/variable_named_dart_test.dart (100%) rename tests/{language => language_2}/vm/allocation_sinking_vm_test.dart (100%) rename tests/{language => language_2}/vm/async_await_catch_stacktrace_test.dart (100%) delete mode 100644 tests/language_strong/type_variable_nested_test.dart delete mode 100644 tests/language_strong/type_variable_scope2_test.dart delete mode 100644 tests/language_strong/type_variable_scope3_test.dart delete mode 100644 tests/language_strong/type_variable_scope_test.dart delete mode 100644 tests/language_strong/type_variable_typedef_test.dart delete mode 100644 tests/language_strong/typed_equality_test.dart delete mode 100644 tests/language_strong/typed_selector2_test.dart delete mode 100644 tests/language_strong/typed_selector_test.dart delete mode 100644 tests/language_strong/typedef_is_test.dart delete mode 100644 tests/language_strong/unary2_test.dart delete mode 100644 tests/language_strong/unary_test.dart delete mode 100644 tests/language_strong/unbalanced_brace_test.dart delete mode 100644 tests/language_strong/unbound_getter_test.dart delete mode 100644 tests/language_strong/unconditional_break.dart delete mode 100644 tests/language_strong/unicode_bom_middle_test.dart delete mode 100644 tests/language_strong/unicode_bom_test.dart delete mode 100644 tests/language_strong/unicode_hash_test.dart delete mode 100644 tests/language_strong/unqual_name_test.dart delete mode 100644 tests/language_strong/unresolved_top_level_var_negative_test.dart delete mode 100644 tests/language_strong/unsigned_right_shift_test.dart delete mode 100644 tests/language_strong/unsupported_operators_test.dart delete mode 100644 tests/language_strong/value_range2_test.dart delete mode 100644 tests/language_strong/value_range3_test.dart delete mode 100644 tests/language_strong/value_range_test.dart delete mode 100644 tests/language_strong/var_init_test.dart delete mode 100644 tests/language_strong/variable_declaration_metadata_test.dart diff --git a/tests/language/language.status b/tests/language/language.status index 764b2a99929..91011bec4b2 100644 --- a/tests/language/language.status +++ b/tests/language/language.status @@ -65,7 +65,6 @@ redirecting_constructor_initializer_test: RuntimeError # Issue 23488 generic_functions_test: Pass # Issue 25869 [ ($compiler == none || $compiler == precompiler || $compiler == app_jit) && ($runtime == vm || $runtime == dart_precompiled || $runtime == flutter) ] -unicode_bom_test: Fail # Issue 16067 vm/debug_break_enabled_vm_test/01: Crash, OK # Expected to hit breakpoint. [ ($compiler == none || $compiler == precompiler || $compiler == app_jit) && $checked ] @@ -265,13 +264,6 @@ method_override2_test/01: CompileTimeError regress_22438_test: CompileTimeError regress_13462_1_test: CompileTimeError instance_creation_in_function_annotation_test: CompileTimeError -type_variable_scope_test/none: CompileTimeError -type_variable_scope_test/00: CompileTimeError -type_variable_scope_test/01: CompileTimeError -type_variable_scope_test/03: CompileTimeError -type_variable_scope_test/02: CompileTimeError -type_variable_scope_test/04: CompileTimeError -type_variable_scope_test/05: CompileTimeError invocation_mirror_invoke_on_test: CompileTimeError method_override3_test/00: CompileTimeError method_override3_test/01: CompileTimeError @@ -385,7 +377,6 @@ check_method_override_test/02: CompileTimeError malformed_inheritance_test/02: CompileTimeError malformed_inheritance_test/04: CompileTimeError malformed_inheritance_test/06: CompileTimeError -unicode_bom_test: CompileTimeError prefix16_test: CompileTimeError deferred_not_loaded_check_test: CompileTimeError regress_23408_test: CompileTimeError @@ -413,7 +404,6 @@ deferred_static_seperate_test: CompileTimeError default_factory_test/01: CompileTimeError internal_library_test/01: CompileTimeError internal_library_test/02: CompileTimeError -type_variable_scope2_test: CompileTimeError mixin_super_bound_test: CompileTimeError invocation_mirror2_test: CompileTimeError deferred_inheritance_constraints_test/redirecting_constructor: CompileTimeError diff --git a/tests/language/language_analyzer2.status b/tests/language/language_analyzer2.status index 80a53251031..a85059b6992 100644 --- a/tests/language/language_analyzer2.status +++ b/tests/language/language_analyzer2.status @@ -65,7 +65,6 @@ interface_test/none: fail # Issue 11575 syntax_test/none: fail # Issue 11575 factory5_test/none: fail # Issue 11578 type_variable_bounds_test/none: fail # Issue 11578 -type_variable_scope_test/none: fail # Issue 11578 factory_implementation_test/none: fail # Issue 11578 malbounded_redirecting_factory_test/none: fail # Issue 11578 malbounded_redirecting_factory2_test/none: fail # Issue 11578 @@ -84,9 +83,6 @@ prefix8_negative_test: fail # Issue 11964 prefix11_negative_test: fail # Issue 11964 static_call_wrong_argument_count_negative_test: fail # Issue 12156 type_parameter_test/none: fail # Issue 12160 -type_variable_static_context_negative_test: fail # Issue 12161 -unresolved_in_factory_negative_test: fail # Issue 12163 -unresolved_top_level_var_negative_test: fail # Issue 12163 prefix3_negative_test: fail # Issue 12191 issue11724_test: fail # Issue 12381 static_field_test/01: fail # Issue 12541 @@ -344,17 +340,11 @@ test_negative_test: CompileTimeError try_catch4_test: StaticWarning try_catch5_test: StaticWarning type_argument_in_super_type_test: StaticWarning -typed_selector2_test: StaticWarning type_variable_identifier_expression_test: StaticWarning -type_variable_scope2_test: StaticWarning type_variable_conflict2_test/02: MissingCompileTimeError type_variable_conflict2_test/06: MissingCompileTimeError type_variable_conflict2_test/08: MissingCompileTimeError type_variable_conflict2_test/10: MissingCompileTimeError -unary_plus_negative_test: CompileTimeError -unbound_getter_test: StaticWarning -unhandled_exception_negative_test: CompileTimeError -unresolved_top_level_method_negative_test: StaticWarning vm/debug_break_vm_test/*: Skip vm/debug_break_enabled_vm_test: Skip vm/type_cast_vm_test: StaticWarning diff --git a/tests/language/language_dart2js.status b/tests/language/language_dart2js.status index 75f09405266..21c9c7ba567 100644 --- a/tests/language/language_dart2js.status +++ b/tests/language/language_dart2js.status @@ -1371,6 +1371,7 @@ syntax_test/30: Crash # 'package:front_end/src/fasta/kernel/kernel_class_builder syntax_test/31: Crash # 'package:front_end/src/fasta/kernel/kernel_class_builder.dart': Failed assertion: line 83 pos 12: 'arguments == null || cls.typeParameters.length == arguments.length': is not true. syntax_test/32: Crash # 'package:front_end/src/fasta/kernel/kernel_class_builder.dart': Failed assertion: line 83 pos 12: 'arguments == null || cls.typeParameters.length == arguments.length': is not true. syntax_test/33: Crash # 'package:front_end/src/fasta/kernel/kernel_class_builder.dart': Failed assertion: line 83 pos 12: 'arguments == null || cls.typeParameters.length == arguments.length': is not true. +type_variable_initializer_test: Crash # 'file:*/pkg/compiler/lib/src/ssa/locals_handler.dart': Failed assertion: line 425 pos 12: '!isStoredInClosureField(local)': Local local(Maps.mapToString#first) is stored in a closure field. wrong_number_type_arguments_test/00: Crash wrong_number_type_arguments_test/02: Crash yieldstar_pause_test: Crash @@ -2209,7 +2210,6 @@ type_variable_conflict2_test/09: Crash type_variable_field_initializer_closure2_test: Crash type_variable_field_initializer_closure_test: Crash type_variable_function_type_test: RuntimeError -type_variable_nested_test: Crash constructor12_test: RuntimeError constructor2_test: RuntimeError constructor3_test: RuntimeError @@ -2232,4 +2232,3 @@ positional_parameters_type_test/01: MissingRuntimeError positional_parameters_type_test/02: MissingRuntimeError super_test: RuntimeError yieldstar_pause_test: Crash - diff --git a/tests/language/type_variable_scope2_test.dart b/tests/language/type_variable_scope2_test.dart deleted file mode 100644 index 2a008f95843..00000000000 --- a/tests/language/type_variable_scope2_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -import "package:expect/expect.dart"; - -// Test that malformed type arguments treated as dynamic in both production and -// checked mode. - -class Foo { - // T is not in scope for a static method. - static Foo m() { - return new Foo(); - } -} - -main() { - try { - Expect.isTrue(Foo.m() is Foo); - } on TypeError catch (error) { - print(error); - // No type error in production nor checked mode. - Expect.fail(); - } -} diff --git a/tests/language/type_variable_static_context_negative_test.dart b/tests/language/type_variable_static_context_negative_test.dart deleted file mode 100644 index 6e9688d7425..00000000000 --- a/tests/language/type_variable_static_context_negative_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// A type variable can't be referenced in a static class - -class A { - static int method() { - var foo = - new T(); // error, can't reference a type variable in a static context - } -} - -main() { - A.method(); -} diff --git a/tests/language/unary_plus_negative_test.dart b/tests/language/unary_plus_negative_test.dart deleted file mode 100644 index 9f68d8ad7eb..00000000000 --- a/tests/language/unary_plus_negative_test.dart +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// There is no unary plus operator in Dart. - -main() { - var a = 1; - var b = +a; -} diff --git a/tests/language/unbound_getter_test.dart b/tests/language/unbound_getter_test.dart deleted file mode 100644 index 74552274384..00000000000 --- a/tests/language/unbound_getter_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. -// Verify that an unbound getter is properly resolved at runtime. - -class A { - const A(); - foo() { - return y; - } -} - -class B extends A { - final y; - const B(val) - : super(), - y = val; -} - -class UnboundGetterTest { - static testMain() { - var b = new B(1); - print(b.foo()); - } -} - -main() { - UnboundGetterTest.testMain(); -} diff --git a/tests/language/unhandled_exception_negative_test.dart b/tests/language/unhandled_exception_negative_test.dart deleted file mode 100644 index f45091557a3..00000000000 --- a/tests/language/unhandled_exception_negative_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. -// Dart test program for testing unhandled exceptions. - -class MyException { - const MyException(String message = "") : message_ = message; - String getMessage() { return message_; } - final String message_; -} - -class Helper { - static int f1(int i) { - int j; - j = i + 200; - j = j + 300; - throw new MyException("Unhandled Exception"); - return i; - } -} - -class UnhandledExceptionNegativeTest { - static testMain() { - Helper.f1(1); - } -} - -main() { - UnhandledExceptionNegativeTest.testMain(); -} diff --git a/tests/language/unresolved_default_constructor_test.dart b/tests/language/unresolved_default_constructor_test.dart deleted file mode 100644 index 1b0a66c52a9..00000000000 --- a/tests/language/unresolved_default_constructor_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// Test unresolved default constructor calls remain unresolved after dart2dart -// translation. - -import 'package:expect/expect.dart'; - -class A { - A.named(); - static method() {} -} - -main() { - A.method(); - Expect.throws(() => new A()); //# 01: static type warning -} diff --git a/tests/language/unresolved_top_level_method_negative_test.dart b/tests/language/unresolved_top_level_method_negative_test.dart deleted file mode 100644 index 2fc13cb421c..00000000000 --- a/tests/language/unresolved_top_level_method_negative_test.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// Test that an unresolved method call at the top level does not crash -// the parser. - -var a = b(); - -main() { - print(a); -} diff --git a/tests/language_2/language_2_analyzer.status b/tests/language_2/language_2_analyzer.status index d46fe49d84d..05d7c4360b5 100644 --- a/tests/language_2/language_2_analyzer.status +++ b/tests/language_2/language_2_analyzer.status @@ -238,6 +238,8 @@ generic_test: StaticWarning getter_setter_in_lib_test: Fail # Issue 23286 getter_setter_in_lib_test: Fail # Issue 23286 getter_declaration_negative_test: CompileTimeError +type_variable_scope_test/none: fail # Issue 11578 +type_variable_static_context_negative_test: fail # Issue 12161 [ $strong && $compiler == dart2analyzer ] accessor_conflict_export2_test: CompileTimeError # Issue 25626 @@ -395,6 +397,20 @@ if_null_assignment_static_test/42: MissingCompileTimeError if_null_precedence_test/06: MissingCompileTimeError if_null_precedence_test/07: MissingCompileTimeError multiple_interface_inheritance_test: StaticWarning # Issue 30552 +type_variable_scope_test/00: MissingCompileTimeError +type_variable_scope_test/01: MissingCompileTimeError +type_variable_scope_test/02: MissingCompileTimeError +type_variable_scope_test/03: MissingCompileTimeError +type_variable_scope_test/04: MissingCompileTimeError +type_variable_scope_test/05: MissingCompileTimeError +type_variable_scope2_test: MissingCompileTimeError +type_variable_static_context_test: MissingCompileTimeError +typed_selector2_test: MissingCompileTimeError +unbound_getter_test: MissingCompileTimeError +unresolved_default_constructor_test/01: MissingCompileTimeError +unresolved_in_factory_test: MissingCompileTimeError +unresolved_top_level_method_test: MissingCompileTimeError +unresolved_top_level_var_test: MissingCompileTimeError [ $compiler == dart2analyzer && $runtime == none ] assertion_initializer_const_error2_test/none: CompileTimeError diff --git a/tests/language_2/language_2_dart2js.status b/tests/language_2/language_2_dart2js.status index f5a726817bd..2119b17a290 100644 --- a/tests/language_2/language_2_dart2js.status +++ b/tests/language_2/language_2_dart2js.status @@ -175,6 +175,23 @@ if_null_assignment_static_test/41: MissingCompileTimeError if_null_assignment_static_test/42: MissingCompileTimeError if_null_precedence_test/06: MissingCompileTimeError if_null_precedence_test/07: MissingCompileTimeError +type_variable_nested_test/01: RuntimeError +type_variable_promotion_test: RuntimeError +type_variable_scope_test/00: MissingCompileTimeError +type_variable_scope_test/01: MissingCompileTimeError +type_variable_scope_test/02: MissingCompileTimeError +type_variable_scope_test/03: MissingCompileTimeError +type_variable_scope_test/04: MissingCompileTimeError +type_variable_scope_test/05: MissingCompileTimeError +type_variable_scope2_test: MissingCompileTimeError +type_variable_static_context_test: MissingCompileTimeError +typed_selector2_test: MissingCompileTimeError +unbound_getter_test: MissingCompileTimeError +unresolved_default_constructor_test/01: MissingCompileTimeError +unresolved_in_factory_test: MissingCompileTimeError +unresolved_top_level_method_test: MissingCompileTimeError +unresolved_top_level_var_test: MissingCompileTimeError +vm/async_await_catch_stacktrace_test: RuntimeError [ $compiler == dart2js && !$minified && $runtime != d8] generic_methods_local_variable_declaration_test: RuntimeError @@ -556,6 +573,9 @@ if_null_assignment_static_test/06: Crash many_generic_instanceof_test: Crash regress_30339_test: Crash # 'file:*/pkg/compiler/lib/src/js_model/closure.dart': Failed assertion: line 197 pos 9: 'closure != null': Corresponding closure class not found for j:getter(Iterable.iterator). Closures found for (j:closure_call(Closure_fromTearOff_closure.call), j:closure_call(Maps_mapToString_closure.call), j:closure_call(main_closure.call), ..., j:closure_call(_awaitOnObject_closure.call), j:closure_call(_awaitOnObject_closure.call)) typevariable_substitution2_test/02: RuntimeError +type_variable_nested_test: Crash +typecheck_multifield_declaration_test: Crash +typedef_is_test: Crash [ $compiler == dart2js && $dart2js_with_kernel && $minified ] abstract_exact_selector_test/none: Crash # NoSuchMethodError: The getter 'thisLocal' was called on null. @@ -745,6 +765,9 @@ if_null_assignment_static_test/06: Crash many_generic_instanceof_test: Crash regress_30339_test: Crash # NoSuchMethodError: The getter 'thisLocal' was called on null. typevariable_substitution2_test/02: RuntimeError +type_variable_nested_test: Crash +typecheck_multifield_declaration_test: Crash +typedef_is_test: Crash [ $compiler == dart2js && ! $dart2js_with_kernel && $runtime != none ] async_star_cancel_while_paused_test: RuntimeError # Issue 22853 diff --git a/tests/language_2/language_2_dartdevc.status b/tests/language_2/language_2_dartdevc.status index 280a5c22f22..d65b1c26164 100644 --- a/tests/language_2/language_2_dartdevc.status +++ b/tests/language_2/language_2_dartdevc.status @@ -38,6 +38,7 @@ generics_test: CompileTimeError get_set_syntax_test/none: CompileTimeError getter_setter_in_lib_test: CompileTimeError multiple_interface_inheritance_test: CompileTimeError # Issue 30552 +type_variable_scope_test/none: CompileTimeError [ $strong && $compiler == dartdevc ] accessor_conflict_export2_test: CompileTimeError # Issue 25626 @@ -111,6 +112,9 @@ call_closurization_test: RuntimeError # Issue 29920 call_test: RuntimeError canonical_const2_test: RuntimeError # Ints and doubles are unified. canonical_const_test: RuntimeError # Ints and doubles are unified. +compile_time_constant_a_test: RuntimeError # Issue 30526 +compile_time_constant_b_test: RuntimeError # Issue 29920 +compile_time_constant_d_test: RuntimeError # Issue 29920 compile_time_constant10_test/none: RuntimeError covariant_subtyping_with_substitution_test: RuntimeError # Issue 30461 function_subtype_inline2_test: RuntimeError @@ -124,7 +128,4 @@ generic_method_types_test/02: RuntimeError generic_method_types_test/03: RuntimeError generic_methods_new_test: RuntimeError getter_closure_execution_order_test: RuntimeError # Issue 29920 -compile_time_constant_a_test: RuntimeError # Issue 30526 -compile_time_constant_b_test: RuntimeError # Issue 29920 -compile_time_constant_d_test: RuntimeError # Issue 29920 identical_closure2_test: RuntimeError # Issue 29920 diff --git a/tests/language_2/language_2_flutter.status b/tests/language_2/language_2_flutter.status index b9c010db6e6..a77a0b63e3c 100644 --- a/tests/language_2/language_2_flutter.status +++ b/tests/language_2/language_2_flutter.status @@ -19,6 +19,15 @@ call_constructor_on_unresolvable_class_test/02: CompileTimeError call_constructor_on_unresolvable_class_test/07: CompileTimeError class_keyword_test/02: CompileTimeError class_override_test/00: CompileTimeError +type_variable_scope_test/none: CompileTimeError +type_variable_scope_test/00: CompileTimeError +type_variable_scope_test/01: CompileTimeError +type_variable_scope_test/03: CompileTimeError +type_variable_scope_test/02: CompileTimeError +type_variable_scope_test/04: CompileTimeError +type_variable_scope_test/05: CompileTimeError +unicode_bom_test: CompileTimeError +type_variable_scope2_test: CompileTimeError # The VM doesn't enforce that potentially const expressions are actually # const expressions when the constructor is called with `const`. diff --git a/tests/language_2/language_2_precompiled.status b/tests/language_2/language_2_precompiled.status index e01851bf338..6dc68fd4df2 100644 --- a/tests/language_2/language_2_precompiled.status +++ b/tests/language_2/language_2_precompiled.status @@ -167,6 +167,22 @@ if_null_precedence_test/06: MissingCompileTimeError if_null_precedence_test/07: MissingCompileTimeError if_null_precedence_test/none: RuntimeError many_generic_instanceof_test: RuntimeError +type_variable_promotion_test: RuntimeError +type_variable_nested_test/01: RuntimeError +type_variable_scope_test/00: MissingCompileTimeError +type_variable_scope_test/01: MissingCompileTimeError +type_variable_scope_test/02: MissingCompileTimeError +type_variable_scope_test/03: MissingCompileTimeError +type_variable_scope_test/04: MissingCompileTimeError +type_variable_scope_test/05: MissingCompileTimeError +type_variable_scope2_test: MissingCompileTimeError +type_variable_static_context_test: MissingCompileTimeError +typed_selector2_test: MissingCompileTimeError +unbound_getter_test: MissingCompileTimeError +unresolved_default_constructor_test/01: MissingCompileTimeError +unresolved_in_factory_test: MissingCompileTimeError +unresolved_top_level_method_test: MissingCompileTimeError +unresolved_top_level_var_test: MissingCompileTimeError [ $compiler == precompiler && $runtime == dart_precompiled ] assertion_initializer_const_error2_test/cc01: Crash, MissingCompileTimeError @@ -236,6 +252,7 @@ generic_methods_recursive_bound_test/03: Crash, Pass [ ($compiler == none || $compiler == precompiler || $compiler == app_jit) && ($runtime == vm || $runtime == dart_precompiled || $runtime == flutter) ] class_keyword_test/02: MissingCompileTimeError # Issue 13627 +unicode_bom_test: Fail # Issue 16067 [ ($compiler == none || $compiler == precompiler || $compiler == app_jit) && $checked ] generic_methods_function_type_test: Pass # Issue 25869 diff --git a/tests/language_2/language_2_vm.status b/tests/language_2/language_2_vm.status index 95c03f6b6c2..2c699f89e9d 100644 --- a/tests/language_2/language_2_vm.status +++ b/tests/language_2/language_2_vm.status @@ -168,6 +168,22 @@ if_null_assignment_static_test/42: MissingCompileTimeError if_null_precedence_test/06: MissingCompileTimeError if_null_precedence_test/07: MissingCompileTimeError many_generic_instanceof_test: RuntimeError +type_variable_nested_test/01: RuntimeError +type_variable_promotion_test: RuntimeError +type_variable_scope_test/00: MissingCompileTimeError +type_variable_scope_test/01: MissingCompileTimeError +type_variable_scope_test/02: MissingCompileTimeError +type_variable_scope_test/03: MissingCompileTimeError +type_variable_scope_test/04: MissingCompileTimeError +type_variable_scope_test/05: MissingCompileTimeError +type_variable_scope2_test: MissingCompileTimeError +type_variable_static_context_test: MissingCompileTimeError +typed_selector2_test: MissingCompileTimeError +unbound_getter_test: MissingCompileTimeError +unresolved_default_constructor_test/01: MissingCompileTimeError +unresolved_in_factory_test: MissingCompileTimeError +unresolved_top_level_method_test: MissingCompileTimeError +unresolved_top_level_var_test: MissingCompileTimeError [ $compiler == none && $runtime == vm ] generic_methods_bounds_test/02: MissingRuntimeError diff --git a/tests/language/type_variable_nested_test.dart b/tests/language_2/type_variable_nested_test.dart similarity index 93% rename from tests/language/type_variable_nested_test.dart rename to tests/language_2/type_variable_nested_test.dart index 9f6424fb709..c47714490b5 100644 --- a/tests/language/type_variable_nested_test.dart +++ b/tests/language_2/type_variable_nested_test.dart @@ -21,7 +21,7 @@ main() { var a = new B(); Expect.isFalse(a._copy is List); Expect.isTrue(a._copy is List); - Expect.isTrue(a._copy is List>); + Expect.isFalse(a._copy is List>); //# 01: ok a = new B(); Expect.isFalse(a._copy is List); diff --git a/tests/language_strong/type_variable_promotion_test.dart b/tests/language_2/type_variable_promotion_test.dart similarity index 89% rename from tests/language_strong/type_variable_promotion_test.dart rename to tests/language_2/type_variable_promotion_test.dart index 6be5df7dcec..42e8454b6c5 100644 --- a/tests/language_strong/type_variable_promotion_test.dart +++ b/tests/language_2/type_variable_promotion_test.dart @@ -30,6 +30,6 @@ class Foo { main() { var foo = new Foo(); var b = new B(); - Expect.equals(foo.foo(b), 'List'); - Expect.listEquals(foo.bar(b), [b]); + Expect.equals('List', foo.foo(b)); + Expect.listEquals([b], foo.bar(b)); } diff --git a/tests/language_strong/unnamed_closure_test.dart b/tests/language_2/type_variable_scope2_test.dart similarity index 54% rename from tests/language_strong/unnamed_closure_test.dart rename to tests/language_2/type_variable_scope2_test.dart index 49fa570dc52..6893e2d771f 100644 --- a/tests/language_strong/unnamed_closure_test.dart +++ b/tests/language_2/type_variable_scope2_test.dart @@ -4,19 +4,13 @@ import "package:expect/expect.dart"; -getNonArray() => new A(); +// Test that malformed type arguments are treated as an error. -class A { - operator [](index) => index; +class Foo { + // T is not in scope for a static method. + static Foo m() { /*@compile-error=unspecified*/ + return new Foo(); + } } -main() { - Expect.equals(42, () { - var res; - do { - var a = getNonArray(); - res = a[42]; - } while (false); - return res; - }()); -} +main() {} diff --git a/tests/language/type_variable_scope3_test.dart b/tests/language_2/type_variable_scope3_test.dart similarity index 100% rename from tests/language/type_variable_scope3_test.dart rename to tests/language_2/type_variable_scope3_test.dart diff --git a/tests/language/type_variable_scope_test.dart b/tests/language_2/type_variable_scope_test.dart similarity index 74% rename from tests/language/type_variable_scope_test.dart rename to tests/language_2/type_variable_scope_test.dart index efc55e38582..b219b2903c4 100644 --- a/tests/language/type_variable_scope_test.dart +++ b/tests/language_2/type_variable_scope_test.dart @@ -8,11 +8,11 @@ class Foo { Foo() {} static - Foo //# 00: static type warning + Foo //# 00: compile-time error m( - Foo //# 01: static type warning + Foo //# 01: compile-time error f) { - Foo x = new Foo(); //# 02: static type warning + Foo x = new Foo(); //# 02: compile-time error return new Foo(); } @@ -22,16 +22,16 @@ class Foo { } // T is not in scope for a static field. - static Foo f1; //# 03: static type warning + static Foo f1; //# 03: compile-time error static - Foo //# 04: static type warning + Foo //# 04: compile-time error get f { return new Foo(); } static void set f( - Foo //# 05: static type warning + Foo //# 05: compile-time error value) {} } diff --git a/tests/language_strong/type_variable_static_context_negative_test.dart b/tests/language_2/type_variable_static_context_test.dart similarity index 75% rename from tests/language_strong/type_variable_static_context_negative_test.dart rename to tests/language_2/type_variable_static_context_test.dart index 6e9688d7425..e0cd2bc2902 100644 --- a/tests/language_strong/type_variable_static_context_negative_test.dart +++ b/tests/language_2/type_variable_static_context_test.dart @@ -6,8 +6,9 @@ class A { static int method() { + // error, can't reference a type variable in a static context var foo = - new T(); // error, can't reference a type variable in a static context + new T(); /*@compile-error=unspecified*/ } } diff --git a/tests/language/type_variable_typedef_test.dart b/tests/language_2/type_variable_typedef_test.dart similarity index 100% rename from tests/language/type_variable_typedef_test.dart rename to tests/language_2/type_variable_typedef_test.dart diff --git a/tests/language/typecheck_multifield_declaration_test.dart b/tests/language_2/typecheck_multifield_declaration_test.dart similarity index 100% rename from tests/language/typecheck_multifield_declaration_test.dart rename to tests/language_2/typecheck_multifield_declaration_test.dart diff --git a/tests/language/typed_equality_test.dart b/tests/language_2/typed_equality_test.dart similarity index 100% rename from tests/language/typed_equality_test.dart rename to tests/language_2/typed_equality_test.dart diff --git a/tests/language/typed_selector2_test.dart b/tests/language_2/typed_selector2_test.dart similarity index 92% rename from tests/language/typed_selector2_test.dart rename to tests/language_2/typed_selector2_test.dart index 618f13a7365..db1cc3076d3 100644 --- a/tests/language/typed_selector2_test.dart +++ b/tests/language_2/typed_selector2_test.dart @@ -15,7 +15,7 @@ main() { if (a(1, 2) != 42) { // This call used to crash dart2js because 'foo' was a typed // selector with a typedef as a receiver type. - a.foo(); + a.foo(); /*@compile-error=unspecified*/ } var b = new A(); b.foo(); diff --git a/tests/language/typed_selector_test.dart b/tests/language_2/typed_selector_test.dart similarity index 100% rename from tests/language/typed_selector_test.dart rename to tests/language_2/typed_selector_test.dart diff --git a/tests/language/typedef_is_test.dart b/tests/language_2/typedef_is_test.dart similarity index 100% rename from tests/language/typedef_is_test.dart rename to tests/language_2/typedef_is_test.dart diff --git a/tests/language/unary2_test.dart b/tests/language_2/unary2_test.dart similarity index 100% rename from tests/language/unary2_test.dart rename to tests/language_2/unary2_test.dart diff --git a/tests/language_strong/unary_plus_negative_test.dart b/tests/language_2/unary_plus_negative_test.dart similarity index 86% rename from tests/language_strong/unary_plus_negative_test.dart rename to tests/language_2/unary_plus_negative_test.dart index 9f68d8ad7eb..86f2942d1d7 100644 --- a/tests/language_strong/unary_plus_negative_test.dart +++ b/tests/language_2/unary_plus_negative_test.dart @@ -6,5 +6,5 @@ main() { var a = 1; - var b = +a; + var b = +a; /*@compile-error=unspecified*/ } diff --git a/tests/language/unary_test.dart b/tests/language_2/unary_test.dart similarity index 100% rename from tests/language/unary_test.dart rename to tests/language_2/unary_test.dart diff --git a/tests/language/unbalanced_brace_test.dart b/tests/language_2/unbalanced_brace_test.dart similarity index 100% rename from tests/language/unbalanced_brace_test.dart rename to tests/language_2/unbalanced_brace_test.dart diff --git a/tests/language_strong/unresolved_in_factory_negative_test.dart b/tests/language_2/unbound_getter_test.dart similarity index 61% rename from tests/language_strong/unresolved_in_factory_negative_test.dart rename to tests/language_2/unbound_getter_test.dart index 8166ac8f510..8eb2120995a 100644 --- a/tests/language_strong/unresolved_in_factory_negative_test.dart +++ b/tests/language_2/unbound_getter_test.dart @@ -1,16 +1,15 @@ // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. - -// Test that an unresolved method call in a factory is a resolution -// error. +// Verify that an unbound getter is properly resolved at runtime. class A { - factory A() { - foo(); + const A(); + foo() { + return y; /*@compile-error=unspecified*/ } } main() { - new A(); + new A().foo(); } diff --git a/tests/language/unconditional_break.dart b/tests/language_2/unconditional_break.dart similarity index 100% rename from tests/language/unconditional_break.dart rename to tests/language_2/unconditional_break.dart diff --git a/tests/language_strong/unhandled_exception_negative_test.dart b/tests/language_2/unhandled_exception_negative_test.dart similarity index 91% rename from tests/language_strong/unhandled_exception_negative_test.dart rename to tests/language_2/unhandled_exception_negative_test.dart index f45091557a3..914505a7b01 100644 --- a/tests/language_strong/unhandled_exception_negative_test.dart +++ b/tests/language_2/unhandled_exception_negative_test.dart @@ -4,7 +4,7 @@ // Dart test program for testing unhandled exceptions. class MyException { - const MyException(String message = "") : message_ = message; + const MyException(String message) : message_ = message; String getMessage() { return message_; } final String message_; } diff --git a/tests/language/unicode_bom_middle_test.dart b/tests/language_2/unicode_bom_middle_test.dart similarity index 100% rename from tests/language/unicode_bom_middle_test.dart rename to tests/language_2/unicode_bom_middle_test.dart diff --git a/tests/language/unicode_bom_test.dart b/tests/language_2/unicode_bom_test.dart similarity index 100% rename from tests/language/unicode_bom_test.dart rename to tests/language_2/unicode_bom_test.dart diff --git a/tests/language/unicode_hash_test.dart b/tests/language_2/unicode_hash_test.dart similarity index 100% rename from tests/language/unicode_hash_test.dart rename to tests/language_2/unicode_hash_test.dart diff --git a/tests/language/unnamed_closure_test.dart b/tests/language_2/unnamed_closure_test.dart similarity index 100% rename from tests/language/unnamed_closure_test.dart rename to tests/language_2/unnamed_closure_test.dart diff --git a/tests/language/unqual_name_test.dart b/tests/language_2/unqual_name_test.dart similarity index 100% rename from tests/language/unqual_name_test.dart rename to tests/language_2/unqual_name_test.dart diff --git a/tests/language_strong/unresolved_default_constructor_test.dart b/tests/language_2/unresolved_default_constructor_test.dart similarity index 67% rename from tests/language_strong/unresolved_default_constructor_test.dart rename to tests/language_2/unresolved_default_constructor_test.dart index 1b0a66c52a9..7d9301bb981 100644 --- a/tests/language_strong/unresolved_default_constructor_test.dart +++ b/tests/language_2/unresolved_default_constructor_test.dart @@ -2,8 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// Test unresolved default constructor calls remain unresolved after dart2dart -// translation. +// Test unresolved default constructor calls cause compilation errors. import 'package:expect/expect.dart'; @@ -14,5 +13,5 @@ class A { main() { A.method(); - Expect.throws(() => new A()); //# 01: static type warning + Expect.throws(() => new A()); //# 01: compile-time error } diff --git a/tests/language/unresolved_in_factory_negative_test.dart b/tests/language_2/unresolved_in_factory_test.dart similarity index 70% rename from tests/language/unresolved_in_factory_negative_test.dart rename to tests/language_2/unresolved_in_factory_test.dart index 8166ac8f510..a9aa72abc72 100644 --- a/tests/language/unresolved_in_factory_negative_test.dart +++ b/tests/language_2/unresolved_in_factory_test.dart @@ -2,12 +2,11 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// Test that an unresolved method call in a factory is a resolution -// error. +// Test that an unresolved method call in a factory is a compile error. class A { factory A() { - foo(); + foo(); /*@compile-error=unspecified*/ } } diff --git a/tests/language/unresolved_top_level_var_negative_test.dart b/tests/language_2/unresolved_top_level_method_test.dart similarity index 64% rename from tests/language/unresolved_top_level_var_negative_test.dart rename to tests/language_2/unresolved_top_level_method_test.dart index 589ddd5e6c1..1aa0503549d 100644 --- a/tests/language/unresolved_top_level_var_negative_test.dart +++ b/tests/language_2/unresolved_top_level_method_test.dart @@ -2,10 +2,10 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// Test that an unresolved identifier at the top level does not crash -// the parser. +// Test that an unresolved method call at the top level creates a compile- +// time error. -var a = b; +var a = b(); /*@compile-error=unspecified*/ main() { print(a); diff --git a/tests/language_strong/unresolved_top_level_method_negative_test.dart b/tests/language_2/unresolved_top_level_var_test.dart similarity index 64% rename from tests/language_strong/unresolved_top_level_method_negative_test.dart rename to tests/language_2/unresolved_top_level_var_test.dart index 2fc13cb421c..daf5305017c 100644 --- a/tests/language_strong/unresolved_top_level_method_negative_test.dart +++ b/tests/language_2/unresolved_top_level_var_test.dart @@ -2,11 +2,11 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// Test that an unresolved method call at the top level does not crash -// the parser. +// Test that an unresolved identifier at the top level causes a compile-time +// error. -var a = b(); +var a = b; /*@compile-error=unspecified*/ main() { print(a); -} +} \ No newline at end of file diff --git a/tests/language/unsigned_right_shift_test.dart b/tests/language_2/unsigned_right_shift_test.dart similarity index 100% rename from tests/language/unsigned_right_shift_test.dart rename to tests/language_2/unsigned_right_shift_test.dart diff --git a/tests/language/unsupported_operators_test.dart b/tests/language_2/unsupported_operators_test.dart similarity index 100% rename from tests/language/unsupported_operators_test.dart rename to tests/language_2/unsupported_operators_test.dart diff --git a/tests/language_strong/unused_overridden_async_test.dart b/tests/language_2/unused_overridden_async_test.dart similarity index 96% rename from tests/language_strong/unused_overridden_async_test.dart rename to tests/language_2/unused_overridden_async_test.dart index 37286bbcef2..da7aa72b9cb 100644 --- a/tests/language_strong/unused_overridden_async_test.dart +++ b/tests/language_2/unused_overridden_async_test.dart @@ -10,14 +10,12 @@ class Base { } class Sub1 extends Base { - @override Future method() async { return 1; } } class Sub2 extends Base { - @override Future method() async { return 2; } diff --git a/tests/language/value_range2_test.dart b/tests/language_2/value_range2_test.dart similarity index 100% rename from tests/language/value_range2_test.dart rename to tests/language_2/value_range2_test.dart diff --git a/tests/language/value_range3_test.dart b/tests/language_2/value_range3_test.dart similarity index 100% rename from tests/language/value_range3_test.dart rename to tests/language_2/value_range3_test.dart diff --git a/tests/language/value_range_test.dart b/tests/language_2/value_range_test.dart similarity index 100% rename from tests/language/value_range_test.dart rename to tests/language_2/value_range_test.dart diff --git a/tests/language/var_init_test.dart b/tests/language_2/var_init_test.dart similarity index 100% rename from tests/language/var_init_test.dart rename to tests/language_2/var_init_test.dart diff --git a/tests/language/variable_declaration_metadata_test.dart b/tests/language_2/variable_declaration_metadata_test.dart similarity index 100% rename from tests/language/variable_declaration_metadata_test.dart rename to tests/language_2/variable_declaration_metadata_test.dart diff --git a/tests/language_strong/variable_named_dart_test.dart b/tests/language_2/variable_named_dart_test.dart similarity index 100% rename from tests/language_strong/variable_named_dart_test.dart rename to tests/language_2/variable_named_dart_test.dart diff --git a/tests/language/vm/allocation_sinking_vm_test.dart b/tests/language_2/vm/allocation_sinking_vm_test.dart similarity index 100% rename from tests/language/vm/allocation_sinking_vm_test.dart rename to tests/language_2/vm/allocation_sinking_vm_test.dart diff --git a/tests/language/vm/async_await_catch_stacktrace_test.dart b/tests/language_2/vm/async_await_catch_stacktrace_test.dart similarity index 100% rename from tests/language/vm/async_await_catch_stacktrace_test.dart rename to tests/language_2/vm/async_await_catch_stacktrace_test.dart diff --git a/tests/language_strong/language_strong.status b/tests/language_strong/language_strong.status index 05949d8d1b9..50cc9992405 100644 --- a/tests/language_strong/language_strong.status +++ b/tests/language_strong/language_strong.status @@ -581,22 +581,6 @@ type_variable_conflict2_test: Skip type_variable_conflict_test: Skip type_variable_function_type_test: Skip type_variable_identifier_expression_test: Skip -type_variable_scope2_test: Skip -type_variable_scope3_test: Skip -type_variable_scope_test: Skip -type_variable_static_context_negative_test: Skip -typed_selector2_test: Skip -unary_plus_negative_test: Skip -unbalanced_brace_test: Skip -unbound_getter_test: Skip -unhandled_exception_negative_test: Skip -unresolved_default_constructor_test: Skip -unresolved_in_factory_negative_test: Skip -unresolved_top_level_method_negative_test: Skip -unresolved_top_level_var_negative_test: Skip -unsigned_right_shift_test: Skip -unsupported_operators_test: Skip -variable_declaration_metadata_test: Skip void_type_test: Skip wrong_number_type_arguments_test: Skip @@ -720,7 +704,6 @@ switch_label_test: RuntimeError # Issue 29920 switch_try_catch_test: RuntimeError # Issue 29920 throwing_lazy_variable_test: RuntimeError # Issue 29920 truncdiv_test: RuntimeError # Issue 29920 -type_variable_nested_test: RuntimeError # Issue 29920 # This test does not generate the expected compile time error, but it also does # not behave correctly at runtime. We cannot record this as "Fail" without diff --git a/tests/language_strong/type_variable_nested_test.dart b/tests/language_strong/type_variable_nested_test.dart deleted file mode 100644 index 9f6424fb709..00000000000 --- a/tests/language_strong/type_variable_nested_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// Regression test for -// http://code.google.com/p/dart/issues/detail?id=9050. - -import 'package:expect/expect.dart'; - -class A {} - -class B { - var _copy; - B() { - // We used to not register the dependency between List and B. - _copy = new List>(); - } -} - -main() { - var a = new B(); - Expect.isFalse(a._copy is List); - Expect.isTrue(a._copy is List); - Expect.isTrue(a._copy is List>); - - a = new B(); - Expect.isFalse(a._copy is List); - Expect.isTrue(a._copy is List); - Expect.isTrue(a._copy is List>); - Expect.isTrue(a._copy is List>); - Expect.isFalse(a._copy is List>); -} diff --git a/tests/language_strong/type_variable_scope2_test.dart b/tests/language_strong/type_variable_scope2_test.dart deleted file mode 100644 index 2a008f95843..00000000000 --- a/tests/language_strong/type_variable_scope2_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -import "package:expect/expect.dart"; - -// Test that malformed type arguments treated as dynamic in both production and -// checked mode. - -class Foo { - // T is not in scope for a static method. - static Foo m() { - return new Foo(); - } -} - -main() { - try { - Expect.isTrue(Foo.m() is Foo); - } on TypeError catch (error) { - print(error); - // No type error in production nor checked mode. - Expect.fail(); - } -} diff --git a/tests/language_strong/type_variable_scope3_test.dart b/tests/language_strong/type_variable_scope3_test.dart deleted file mode 100644 index cea3ee557a7..00000000000 --- a/tests/language_strong/type_variable_scope3_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// Test that a type parameter cannot be repeated. - -class Foo< - T - , T // //# 00: compile-time error - > {} - -main() { - new Foo< - String - , String // //# 00: continued - >(); -} diff --git a/tests/language_strong/type_variable_scope_test.dart b/tests/language_strong/type_variable_scope_test.dart deleted file mode 100644 index efc55e38582..00000000000 --- a/tests/language_strong/type_variable_scope_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// Test that type variables referenced from within static members are malformed. - -class Foo { - Foo() {} - - static - Foo //# 00: static type warning - m( - Foo //# 01: static type warning - f) { - Foo x = new Foo(); //# 02: static type warning - return new Foo(); - } - - // T is in scope for a factory method. - factory Foo.I(Foo f) { - Foo x = f; - } - - // T is not in scope for a static field. - static Foo f1; //# 03: static type warning - - static - Foo //# 04: static type warning - get f { - return new Foo(); - } - - static void set f( - Foo //# 05: static type warning - value) {} -} - -abstract class I { - factory I(Foo f) = Foo.I; -} - -main() { - Foo.m(new Foo()); - new I(new Foo()); - Foo.f1 = new Foo(); //# 03: continued - var x = Foo.f; - Foo.f = x; -} diff --git a/tests/language_strong/type_variable_typedef_test.dart b/tests/language_strong/type_variable_typedef_test.dart deleted file mode 100644 index caa1649f0e3..00000000000 --- a/tests/language_strong/type_variable_typedef_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// Test that rti dependency registration takes type variables within typedefs -// into account. - -import 'package:expect/expect.dart'; - -typedef Foo(T t); - -class A { - m() => new B>(); -} - -class B { - m(o) => o is T; -} - -foo(int i) {} -bar(String s) {} - -void main() { - Expect.isTrue(new A().m().m(foo)); - Expect.isFalse(new A().m().m(bar)); - Expect.isFalse(new A().m().m(foo)); - Expect.isTrue(new A().m().m(bar)); - Expect.isFalse(new A().m().m(foo)); - Expect.isFalse(new A().m().m(bar)); -} diff --git a/tests/language_strong/typed_equality_test.dart b/tests/language_strong/typed_equality_test.dart deleted file mode 100644 index 9f48e7910b6..00000000000 --- a/tests/language_strong/typed_equality_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// Regression test for http://dartbug.com/6036. dart2js used to fail -// this method because it was computing that intersecting type D with -// type C is conflicting. - -foo(a, b) { - if (identical(a, b)) return; - throw 'broken'; -} - -class D {} - -class C implements D {} - -main() { - var c = new C(); - foo(c, c as D); -} diff --git a/tests/language_strong/typed_selector2_test.dart b/tests/language_strong/typed_selector2_test.dart deleted file mode 100644 index 618f13a7365..00000000000 --- a/tests/language_strong/typed_selector2_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. -// Test for dart2js to handle a typed selector with a typedef as a -// receiver type. - -getComparator() => (a, b) => 42; - -class A { - foo() => 42; -} - -main() { - Comparator a = getComparator(); - if (a(1, 2) != 42) { - // This call used to crash dart2js because 'foo' was a typed - // selector with a typedef as a receiver type. - a.foo(); - } - var b = new A(); - b.foo(); -} diff --git a/tests/language_strong/typed_selector_test.dart b/tests/language_strong/typed_selector_test.dart deleted file mode 100644 index 98c2d0892f4..00000000000 --- a/tests/language_strong/typed_selector_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -import "package:expect/expect.dart"; - -// Regression test for http://dartbug.com/6259. This test used to fail -// on dart2js because class A does not know [A.document] is a target for -// the call [:obj.document:] in the [main] method. Therefore, dart2js -// would not compile [A.document]. - -class A { - get document => 42; -} - -abstract class B { - get document; // Abstract. -} - -class C extends A implements B {} - -int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1)); - -void main() { - var tab = [new Object(), new C()]; - var obj = tab[inscrutable(1)]; - int res = 0; - if (obj is B) res = obj.document; - Expect.equals(42, res); -} diff --git a/tests/language_strong/typedef_is_test.dart b/tests/language_strong/typedef_is_test.dart deleted file mode 100644 index b015f4600a4..00000000000 --- a/tests/language_strong/typedef_is_test.dart +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -import "package:expect/expect.dart"; - -// Test is-test of typedefs with optional and named parameters. - -typedef int Func1(int a); -typedef int Func2(int a, [int b]); -typedef int Func3(int a, [int b, int c]); -typedef int Func4([int a, int b, int c]); -typedef int Func5(int a, {int b}); -typedef int Func6(int a, {int b, int c}); -typedef int Func7({int a, int b, int c}); - -void main() { - int func1(int i) {} - Expect.isTrue(func1 is Func1); - Expect.isFalse(func1 is Func2); - Expect.isFalse(func1 is Func3); - Expect.isFalse(func1 is Func4); - Expect.isFalse(func1 is Func5); - Expect.isFalse(func1 is Func6); - Expect.isFalse(func1 is Func7); - - int func2(int i, int j) {} - Expect.isFalse(func2 is Func1); - Expect.isFalse(func2 is Func2); - Expect.isFalse(func2 is Func3); - Expect.isFalse(func2 is Func4); - Expect.isFalse(func2 is Func5); - Expect.isFalse(func2 is Func6); - Expect.isFalse(func2 is Func7); - - int func3(int i, int j, int k) {} - Expect.isFalse(func3 is Func1); - Expect.isFalse(func3 is Func2); - Expect.isFalse(func3 is Func3); - Expect.isFalse(func3 is Func4); - Expect.isFalse(func3 is Func5); - Expect.isFalse(func3 is Func6); - Expect.isFalse(func3 is Func7); - - int func4(int i, [int j]) {} - Expect.isTrue(func4 is Func1); - Expect.isTrue(func4 is Func2); - Expect.isFalse(func4 is Func3); - Expect.isFalse(func4 is Func4); - Expect.isFalse(func4 is Func5); - Expect.isFalse(func4 is Func6); - Expect.isFalse(func4 is Func7); - - int func5(int i, [int j, int k]) {} - Expect.isTrue(func5 is Func1); - Expect.isTrue(func5 is Func2); - Expect.isTrue(func5 is Func3); - Expect.isFalse(func5 is Func4); - Expect.isFalse(func5 is Func5); - Expect.isFalse(func5 is Func6); - Expect.isFalse(func5 is Func7); - - int func6([int i, int j, int k]) {} - Expect.isTrue(func6 is Func1); - Expect.isTrue(func6 is Func2); - Expect.isTrue(func6 is Func3); - Expect.isTrue(func6 is Func4); - Expect.isFalse(func6 is Func5); - Expect.isFalse(func6 is Func6); - Expect.isFalse(func6 is Func7); - - int func7(int i, {int j}) {} - Expect.isTrue(func7 is Func1); - Expect.isFalse(func7 is Func2); - Expect.isFalse(func7 is Func3); - Expect.isFalse(func7 is Func4); - Expect.isFalse(func7 is Func5); - Expect.isFalse(func7 is Func6); - Expect.isFalse(func7 is Func7); - - int func8(int i, {int b}) {} - Expect.isTrue(func8 is Func1); - Expect.isFalse(func8 is Func2); - Expect.isFalse(func8 is Func3); - Expect.isFalse(func8 is Func4); - Expect.isTrue(func8 is Func5); - Expect.isFalse(func8 is Func6); - Expect.isFalse(func8 is Func7); - - int func9(int i, {int b, int c}) {} - Expect.isTrue(func9 is Func1); - Expect.isFalse(func9 is Func2); - Expect.isFalse(func9 is Func3); - Expect.isFalse(func9 is Func4); - Expect.isTrue(func9 is Func5); - Expect.isTrue(func9 is Func6); - Expect.isFalse(func9 is Func7); - - int func10(int i, {int c, int b}) {} - Expect.isTrue(func10 is Func1); - Expect.isFalse(func10 is Func2); - Expect.isFalse(func10 is Func3); - Expect.isFalse(func10 is Func4); - Expect.isTrue(func10 is Func5); - Expect.isTrue(func10 is Func6); - Expect.isFalse(func10 is Func7); - - int func11({int a, int b, int c}) {} - Expect.isFalse(func11 is Func1); - Expect.isFalse(func11 is Func2); - Expect.isFalse(func11 is Func3); - Expect.isFalse(func11 is Func4); - Expect.isFalse(func11 is Func5); - Expect.isFalse(func11 is Func6); - Expect.isTrue(func11 is Func7); - - int func12({int c, int a, int b}) {} - Expect.isFalse(func12 is Func1); - Expect.isFalse(func12 is Func2); - Expect.isFalse(func12 is Func3); - Expect.isFalse(func12 is Func4); - Expect.isFalse(func12 is Func5); - Expect.isFalse(func12 is Func6); - Expect.isTrue(func12 is Func7); -} diff --git a/tests/language_strong/unary2_test.dart b/tests/language_strong/unary2_test.dart deleted file mode 100644 index a79933996d0..00000000000 --- a/tests/language_strong/unary2_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. -// Dart test for testing binary operations. - -import "package:expect/expect.dart"; - -class UnaryTest { - static foo() { - return -4; - } - - static moo() { - return 5; - } - - static testMain() { - Expect.equals(1, (UnaryTest.foo() + UnaryTest.moo())); - } -} - -main() { - UnaryTest.testMain(); -} diff --git a/tests/language_strong/unary_test.dart b/tests/language_strong/unary_test.dart deleted file mode 100644 index d2421c044f3..00000000000 --- a/tests/language_strong/unary_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -import "package:expect/expect.dart"; - -// Dart test for testing binary operations. - -class UnaryTest { - static foo() { - return 4; - } - - static moo() { - return 5; - } - - static testMain() { - Expect.equals(9.0, (UnaryTest.foo() + UnaryTest.moo())); - } -} - -main() { - UnaryTest.testMain(); -} diff --git a/tests/language_strong/unbalanced_brace_test.dart b/tests/language_strong/unbalanced_brace_test.dart deleted file mode 100644 index 7f5381a269c..00000000000 --- a/tests/language_strong/unbalanced_brace_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// Test syntax errors related to unterminated braces. - -class A { - m() { - /* //# 01: compile-time error - } - // */ - -/* //# 02: compile-time error -} -// */ - -class B {} - -main() { - new A(); - new B(); -} diff --git a/tests/language_strong/unbound_getter_test.dart b/tests/language_strong/unbound_getter_test.dart deleted file mode 100644 index 74552274384..00000000000 --- a/tests/language_strong/unbound_getter_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. -// Verify that an unbound getter is properly resolved at runtime. - -class A { - const A(); - foo() { - return y; - } -} - -class B extends A { - final y; - const B(val) - : super(), - y = val; -} - -class UnboundGetterTest { - static testMain() { - var b = new B(1); - print(b.foo()); - } -} - -main() { - UnboundGetterTest.testMain(); -} diff --git a/tests/language_strong/unconditional_break.dart b/tests/language_strong/unconditional_break.dart deleted file mode 100644 index 63ec511883d..00000000000 --- a/tests/language_strong/unconditional_break.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// Test to ensure that we get don't exceptions in the SSA verifier when -// generating phi for the return value of an inlined function that contains a -// loop that always breaks. -doWhileBreak() { - do { - break; - } while (true); -} - -main() { - doWhileBreak(); -} diff --git a/tests/language_strong/unicode_bom_middle_test.dart b/tests/language_strong/unicode_bom_middle_test.dart deleted file mode 100644 index e620b2b0ec9..00000000000 --- a/tests/language_strong/unicode_bom_middle_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -import "package:expect/expect.dart"; - -int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1)); - -foo(x) { - if (inscrutable(1999) == 1999) return x; - return 499; -} - -main() { - Expect.equals(3, "xx".length); // BOM character between the xs. - Expect.equals(3, foo("xx").length); // BOM character between the xs. -} diff --git a/tests/language_strong/unicode_bom_test.dart b/tests/language_strong/unicode_bom_test.dart deleted file mode 100644 index 2e234458d9a..00000000000 --- a/tests/language_strong/unicode_bom_test.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// This file is saved with a BOM character (as first character). This character -// should be ignored. -// Tests that files with a BOM character are correctly handled. - -main() { - /* do nothing. */ -} diff --git a/tests/language_strong/unicode_hash_test.dart b/tests/language_strong/unicode_hash_test.dart deleted file mode 100644 index 430c51ef16c..00000000000 --- a/tests/language_strong/unicode_hash_test.dart +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -import "package:expect/expect.dart"; - -main() { - Expect.equals("\u{10412}", "𐐒"); // Second string is literal U+10412. - Expect.equals("\u{10412}".hashCode, "𐐒".hashCode); -} diff --git a/tests/language_strong/unqual_name_test.dart b/tests/language_strong/unqual_name_test.dart deleted file mode 100644 index d4c8d48664e..00000000000 --- a/tests/language_strong/unqual_name_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. -// Dart test program to check that we can resolve unqualified identifiers - -import "package:expect/expect.dart"; - -class B { - B(x, y) : b = y {} - var b; - - get_b() { - // Resolving unqualified instance method. - return really_really_get_it(); - } - - really_really_get_it() { - return 5; - } -} - -class UnqualNameTest { - static eleven() { - return 11; - } - - static testMain() { - var o = new B(3, 5); - Expect.equals(11, eleven()); // Unqualified static method call. - Expect.equals(5, o.get_b()); - - // Check whether we handle variable initializers correctly. - var a = 1, x, b = a + 3; - Expect.equals(5, a + b); - } -} - -main() { - UnqualNameTest.testMain(); -} diff --git a/tests/language_strong/unresolved_top_level_var_negative_test.dart b/tests/language_strong/unresolved_top_level_var_negative_test.dart deleted file mode 100644 index 589ddd5e6c1..00000000000 --- a/tests/language_strong/unresolved_top_level_var_negative_test.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// Test that an unresolved identifier at the top level does not crash -// the parser. - -var a = b; - -main() { - print(a); -} diff --git a/tests/language_strong/unsigned_right_shift_test.dart b/tests/language_strong/unsigned_right_shift_test.dart deleted file mode 100644 index e35fa5d093a..00000000000 --- a/tests/language_strong/unsigned_right_shift_test.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// The >>> operator is not supported in Dart - -main() { - var foo = -10 - >>> 1 //# 01: compile-time error - ; - foo >>>= 1; //# 02: compile-time error -} diff --git a/tests/language_strong/unsupported_operators_test.dart b/tests/language_strong/unsupported_operators_test.dart deleted file mode 100644 index e9add7ba5d2..00000000000 --- a/tests/language_strong/unsupported_operators_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// Test handling of unsupported operators. - -library unsupported_operators; - -class C { - m() { - print( - super === //# 01: compile-time error - null); - print( - super !== //# 02: compile-time error - null); - } -} - -void main() { - new C().m(); - new C().m(); - print( - "foo" === //# 03: compile-time error - null); - print( - "foo" !== //# 04: compile-time error - null); -} diff --git a/tests/language_strong/value_range2_test.dart b/tests/language_strong/value_range2_test.dart deleted file mode 100644 index 4bf88209b34..00000000000 --- a/tests/language_strong/value_range2_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -import "package:expect/expect.dart"; - -int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1)); - -foo() { - int x = 0; - if (inscrutable(0) == 0) x = -2; // x is now in range [-2 .. 0]. - int y = 2; - if (inscrutable(0) == 0) y = 4; // y is now in range [2 .. 4]. - int i = y - x; // i should be in range [2 .. 6]. - i -= 4; // i should be in range [-2 .. 2]. Actual value: 2. - var a = const [1]; - return a[i]; -} - -main() { - Expect.throws(() => foo(), (e) => e is RangeError); -} diff --git a/tests/language_strong/value_range3_test.dart b/tests/language_strong/value_range3_test.dart deleted file mode 100644 index 7180938c7f8..00000000000 --- a/tests/language_strong/value_range3_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -import 'package:expect/expect.dart'; - -class A { - copy(array, index1, index2) { - if (index1 < index2 + index2) { - // dart2js used to remove the bounds check. - return array[index1]; - } - } -} - -main() { - Expect.throws(() => new A().copy(new List(0), 0, 1), (e) => e is RangeError); -} diff --git a/tests/language_strong/value_range_test.dart b/tests/language_strong/value_range_test.dart deleted file mode 100644 index b15d0e58011..00000000000 --- a/tests/language_strong/value_range_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -import "package:expect/expect.dart"; - -int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1)); - -foo() { - var x = 0x102; - if (inscrutable(x) == 0) x = 0x0; - if (inscrutable(10) == 10) x = 0x10; // x is in range [0 .. 0x102]. - x = x & 0xFF; // x should be in range [0 .. 0xFF]. Actual value: 0x10. - var a = const [1, 2, 3]; - return a[x]; -} - -main() { - Expect.throws(() => foo(), (e) => e is RangeError); -} diff --git a/tests/language_strong/var_init_test.dart b/tests/language_strong/var_init_test.dart deleted file mode 100644 index 61ffd9bb139..00000000000 --- a/tests/language_strong/var_init_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. -// Testing correct initialization of variables in scopes. - -import "package:expect/expect.dart"; - -class VarInitTest { - static void testMain() { - for (int i = 0; i < 10; i++) { - var x; - Expect.equals(null, x); - x = 1; - } - } -} - -main() { - VarInitTest.testMain(); -} diff --git a/tests/language_strong/variable_declaration_metadata_test.dart b/tests/language_strong/variable_declaration_metadata_test.dart deleted file mode 100644 index 68a7ed51463..00000000000 --- a/tests/language_strong/variable_declaration_metadata_test.dart +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// Verify that the individual variable declarations inside a variable -// declaration list are not allowed to be annotated with metadata. - -const annotation = null; - -var - @annotation //# 01: compile-time error - v1, - @annotation //# 02: compile-time error - v2; - -int - @annotation //# 03: compile-time error - v3, - @annotation //# 04: compile-time error - v4; - -class C { - var - @annotation //# 05: compile-time error - f1, - @annotation //# 06: compile-time error - f2; - - int - @annotation //# 07: compile-time error - f3, - @annotation //# 08: compile-time error - f4; -} - -use(x) => x; - -main() { - use(v1); - use(v2); - use(v3); - use(v4); - - C c = new C(); - use(c.f1); - use(c.f2); - use(c.f3); - use(c.f4); - - var - @annotation //# 09: compile-time error - l1, - @annotation //# 10: compile-time error - l2; - - int - @annotation //# 11: compile-time error - l3, - @annotation //# 12: compile-time error - l4; - - use(l1); - use(l2); - use(l3); - use(l4); - - for (var - @annotation //# 13: compile-time error - i1 = 0, - @annotation //# 14: compile-time error - i2 = 0;;) { - use(i1); - use(i2); - break; - } - - for (int - @annotation //# 15: compile-time error - i3 = 0, - @annotation //# 16: compile-time error - i4 = 0;;) { - use(i3); - use(i4); - break; - } -}