diff --git a/tests/language_2/language_2.status b/tests/language_2/language_2.status index 50d0455fcfd..c8e210f8430 100644 --- a/tests/language_2/language_2.status +++ b/tests/language_2/language_2.status @@ -60,6 +60,7 @@ issue_22780_test/01: Pass, Crash # Issue 29094 issue_1751477_test: Crash # Requires deferred libraries regress_23408_test: Crash # Requires deferred libraries regress_22443_test: Crash # Requires deferred libraries +regress_28278_test: Crash # Requires deferred libraries static_closure_identical_test: Pass, Fail # Closure identity vm/regress_27201_test: Pass, Crash # Requires deferred libraries vm/optimized_stacktrace_test: Pass, Slow diff --git a/tests/language_2/language_2_analyzer.status b/tests/language_2/language_2_analyzer.status index 72aded47ca6..99598293abc 100644 --- a/tests/language_2/language_2_analyzer.status +++ b/tests/language_2/language_2_analyzer.status @@ -815,9 +815,9 @@ enum_syntax_test/05: Fail # Issue 21649 enum_syntax_test/06: Fail # Issue 21649 field3_test/01: MissingCompileTimeError final_syntax_test/01: Fail # Issue 11124 -final_syntax_test/04: Fail # Issue 11124 final_syntax_test/02: Fail # Issue 11124 final_syntax_test/03: Fail # Issue 11124 +final_syntax_test/04: Fail # Issue 11124 generic_methods_generic_function_parameter_test: CompileTimeError # Issue 28515 generic_local_functions_test: CompileTimeError # Issue 28515 generic_list_checked_test: StaticWarning @@ -932,6 +932,13 @@ private_member3_negative_test: fail # Issue 14021 prefix7_negative_test: CompileTimeError regress_27617_test/1: MissingCompileTimeError regress_23408_test: Skip # don't care about the static warning. +regress_29025_test: CompileTimeError # Issue 29081 +regress_29405_test: CompileTimeError # Issue 29421 +regress_29349_test: CompileTimeError # Issue 29744 +regress_30121_test: CompileTimeError # Issue 31087 +reify_typevar_static_test/00: MissingCompileTimeError # Issue 21565 +static_call_wrong_argument_count_negative_test: fail # Issue 12156 +syntax_test/none: fail # Issue 11575 test_negative_test: CompileTimeError try_catch_on_syntax_test/10: MissingCompileTimeError try_catch_on_syntax_test/11: MissingCompileTimeError @@ -1459,6 +1466,7 @@ instantiate_type_variable_test/01: CompileTimeError no_main_test/01: MissingStaticWarning # Issue 28823 no_such_method_negative_test: CompileTimeError string_interpolate_test: CompileTimeError +reify_typevar_static_test/00: MissingCompileTimeError # Issue 28823 [$compiler == dart2analyzer] vm/regress_27201_test: SkipByDesign # Loads bad library, so will always crash. diff --git a/tests/language_2/language_2_dart2js.status b/tests/language_2/language_2_dart2js.status index 0b9f93caa88..c57421a72f4 100644 --- a/tests/language_2/language_2_dart2js.status +++ b/tests/language_2/language_2_dart2js.status @@ -646,6 +646,8 @@ regress_23089_test: MissingCompileTimeError regress_23408_test: RuntimeError regress_26133_test: MissingCompileTimeError regress_27572_test: MissingCompileTimeError +return_type_test: MissingCompileTimeError +rewrite_implicit_this_test/01: MissingCompileTimeError runtime_type_function_test: RuntimeError setter_override2_test/none: CompileTimeError static_field1_test/01: MissingCompileTimeError @@ -868,6 +870,7 @@ deferred_constraints_type_annotation_test/type_annotation_top_level: MissingComp deferred_not_loaded_check_test: Fail # Issue 27577 double_int_to_string_test: RuntimeError # Issue 1533 enum_test: Fail # Issue 28340 +final_attempt_reinitialization_test.dart: Skip # Issue 29659 final_field_override_test: RuntimeError generalized_void_syntax_test: CompileTimeError # Issue #30176. generic_field_mixin4_test: Crash # Issue 18651 @@ -964,6 +967,8 @@ final_attempt_reinitialization_test.dart: Skip # Issue 29659 mixin_forwarding_constructor4_test/01: MissingCompileTimeError # Issue 15101 mixin_forwarding_constructor4_test/02: MissingCompileTimeError # Issue 15101 mixin_forwarding_constructor4_test/03: MissingCompileTimeError # Issue 15101 +regress_28341_test: Fail # Issue 28340 +truncdiv_test: RuntimeError # Issue 15246 [ $compiler == dart2js && $runtime != none && !$checked && !$dart2js_with_kernel ] covariant_subtyping_tearoff1_test: RuntimeError @@ -1272,6 +1277,7 @@ field_override3_test/03: MissingCompileTimeError field_override4_test/02: MissingCompileTimeError final_attempt_reinitialization_test/01: MissingCompileTimeError final_attempt_reinitialization_test/02: MissingCompileTimeError +final_field_initialization_order_test: RuntimeError function_subtype_bound_closure3_test: RuntimeError function_subtype_bound_closure4_test: RuntimeError function_subtype_bound_closure7_test: RuntimeError @@ -1447,6 +1453,7 @@ regress_27617_test/1: Crash # Assertion failure: Unexpected constructor j:constr regress_28217_test/01: MissingCompileTimeError regress_28217_test/none: MissingCompileTimeError regress_28255_test: RuntimeError +regress_28278_test: CompileTimeError regress_29784_test/01: Crash # Assertion failure: Cannot find value Instance of 'ThisLocal' in () for j:constructor(A.ok). regress_29784_test/02: Crash # Assertion failure: Cannot find value Instance of 'ThisLocal' in () for j:constructor(A.ko). setter_declaration2_negative_test: Crash # RangeError (index): Invalid value: Valid value range is empty: 0 @@ -1846,6 +1853,7 @@ regress_27617_test/1: Crash # Assertion failure: Unexpected constructor j:constr regress_28217_test/01: MissingCompileTimeError regress_28217_test/none: MissingCompileTimeError regress_28255_test: RuntimeError +regress_28278_test: CompileTimeError regress_29784_test/01: Crash # Issue 29784 regress_29784_test/02: Crash # Issue 29784 setter_declaration_negative_test: Fail @@ -1979,7 +1987,6 @@ async_return_types_test/nestedFuture: Fail # Issue 26429 async_return_types_test/wrongTypeParameter: Fail # Issue 26429 covariant_subtyping_test: CompileTimeError default_factory2_test/01: Fail # Issue 14121 -regress_26133_test: RuntimeError # Issue 26429 malbounded_type_cast_test: Fail # Issue 14121 malbounded_type_test_test/03: Fail # Issue 14121 malbounded_type_test_test/04: Fail # Issue 14121 @@ -1987,6 +1994,8 @@ malbounded_redirecting_factory_test/02: Fail # Issue 12825 malbounded_redirecting_factory_test/03: Fail # Issue 12825 malbounded_instantiation_test/01: Fail # Issue 12702 malbounded_type_cast2_test: Fail # Issue 14121 +regress_26133_test: RuntimeError # Issue 26429 +regress_29405_test: Fail # Issue 29422 [ $compiler == dart2js && !$checked ] type_argument_in_super_type_test: RuntimeError diff --git a/tests/language_2/language_2_dartdevc.status b/tests/language_2/language_2_dartdevc.status index ff3461013f0..26fed3f8185 100644 --- a/tests/language_2/language_2_dartdevc.status +++ b/tests/language_2/language_2_dartdevc.status @@ -54,6 +54,13 @@ getter_setter_in_lib_test: CompileTimeError import_core_prefix_test: CompileTimeError # "dynamic" should be defined in core. import_private_test/01: MissingCompileTimeError # Issue 29920 initializing_formal_final_test: MissingCompileTimeError +local_function2_test/none: RuntimeError +local_function3_test/none: RuntimeError +local_function_test/none: RuntimeError +mixin_super_2_test/01: MissingCompileTimeError +mixin_super_2_test/03: MissingCompileTimeError +mock_writable_final_private_field_test: CompileTimeError # Issue 30848 +multiple_interface_inheritance_test: CompileTimeError # Issue 30552 interceptor6_test: CompileTimeError interface_test/00: MissingCompileTimeError internal_library_test/01: MissingCompileTimeError # Issue 29920 @@ -66,13 +73,6 @@ library_env_test/has_no_mirror_support: RuntimeError # Issue 30907 library_env_test/has_no_html_support: RuntimeError, OK library_env_test/has_io_support: RuntimeError, OK library_env_test/has_mirror_support: RuntimeError, OK -local_function2_test/none: RuntimeError -local_function3_test/none: RuntimeError -local_function_test/none: RuntimeError -mixin_super_2_test/01: MissingCompileTimeError -mixin_super_2_test/03: MissingCompileTimeError -mock_writable_final_private_field_test: CompileTimeError # Issue 30848 -multiple_interface_inheritance_test: CompileTimeError # Issue 30552 no_such_method_test: RuntimeError override_field_test/03: MissingCompileTimeError override_inheritance_abstract_test/02: MissingCompileTimeError @@ -118,6 +118,7 @@ regress_27617_test/1: MissingCompileTimeError setter_override2_test/none: CompileTimeError stacktrace_demangle_ctors_test: RuntimeError # Issue 31089 string_interpolate_test: CompileTimeError +reify_typevar_static_test/00: MissingCompileTimeError # Issue 29920 super_call4_test: RuntimeError super_no_such_method1_test: RuntimeError super_no_such_method2_test: RuntimeError @@ -152,6 +153,12 @@ multiline_newline_test/04r: MissingCompileTimeError multiline_newline_test/05: MissingCompileTimeError multiline_newline_test/05r: MissingCompileTimeError multiline_newline_test/none: RuntimeError +regress_29025_test: CompileTimeError # Issue 29081 +regress_29349_test: CompileTimeError # Issue 31093 +regress_29405_test: CompileTimeError # Issue 29421 +regress_29784_test/02: CompileTimeError, Crash # Issue 27809 +regress_29949_test: RuntimeError # Issue 31086 +regress_30121_test: CompileTimeError # Issue 31087 regress_30339_test: CompileTimeError # As expected. Should we make this a multi test? string_interpolation_and_buffer_test: RuntimeError string_literals_test: RuntimeError diff --git a/tests/language_2/language_2_kernel.status b/tests/language_2/language_2_kernel.status index 762849a7f4f..19e5ecf7ee8 100644 --- a/tests/language_2/language_2_kernel.status +++ b/tests/language_2/language_2_kernel.status @@ -21,6 +21,7 @@ hello_dart_test: Crash # error: expected: cls.is_type_finalized() library_env_test/has_no_mirror_support: RuntimeError regress_29784_test/01: MissingCompileTimeError regress_29784_test/02: MissingCompileTimeError +rewrite_implicit_this_test/01: MissingCompileTimeError setter_declaration2_negative_test: DartkCrash setter_declaration_negative_test: Fail setter_override2_test/none: CompileTimeError @@ -169,6 +170,7 @@ if_null_evaluation_order_test: Pass if_null_precedence_test/06: MissingCompileTimeError if_null_precedence_test/07: MissingCompileTimeError if_null_precedence_test/none: RuntimeError +main_not_a_function_test: DartkCrash malbounded_type_cast_test/00: MissingCompileTimeError malbounded_type_cast_test/01: MissingCompileTimeError malbounded_type_cast_test/02: MissingCompileTimeError @@ -250,7 +252,6 @@ super_no_such_method5_test/01: MissingCompileTimeError super_operator_index5_test/01: MissingCompileTimeError super_operator_index5_test/02: MissingCompileTimeError wrong_number_type_arguments_test/*: MissingCompileTimeError -main_not_a_function_test: DartkCrash [ $compiler == dartk && $runtime == vm && !$checked ] assertion_initializer_const_error2_test/cc02: MissingCompileTimeError @@ -402,6 +403,8 @@ deferred_type_dependency_test/is: CompileTimeError # Fasta/KernelVM bug: Deferre deferred_type_dependency_test/none: CompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 28335. deferred_type_dependency_test/type_annotation: CompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 28335. dynamic_prefix_core_test/01: RuntimeError # KernelVM bug: Blocked on language issue 29125. +final_attempt_reinitialization_test/01: MissingCompileTimeError # Issue 29900 +final_attempt_reinitialization_test/02: MissingCompileTimeError # Issue 29900 function_type/function_type0_test: RuntimeError function_type/function_type10_test: RuntimeError function_type/function_type11_test: RuntimeError @@ -528,8 +531,7 @@ regress_23408_test: CompileTimeError # Fasta/KernelVM bug: Deferred loading kern regress_27617_test/1: MissingCompileTimeError # Fasta bug: Bad constructor redirection. regress_28217_test/01: MissingCompileTimeError # Fasta bug: Bad constructor redirection. regress_28217_test/none: MissingCompileTimeError # Fasta bug: Bad constructor redirection. -final_attempt_reinitialization_test/01: MissingCompileTimeError # Issue 29900 -final_attempt_reinitialization_test/02: MissingCompileTimeError # Issue 29900 +regress_28278_test: CompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 28335. [ $checked && ($compiler == dartk || $compiler == dartkp) ] assign_static_type_test/02: MissingCompileTimeError @@ -625,3 +627,4 @@ regress_22728_test: Fail # Dartk Issue 28498 malbounded_type_cast_test: Crash external_test/13: Crash final_syntax_test/09: Crash +regress_29025_test: Crash diff --git a/tests/language_2/language_2_precompiled.status b/tests/language_2/language_2_precompiled.status index d1bb1160e84..005c545afcc 100644 --- a/tests/language_2/language_2_precompiled.status +++ b/tests/language_2/language_2_precompiled.status @@ -956,3 +956,6 @@ vm/regress_28325_test:Skip [$compiler == precompiler && $runtime == dart_precompiled ] stacktrace_demangle_ctors_test: RuntimeError + +[ $compiler == precompiler && $runtime == dart_precompiled && $mode == debug ] +regress_29025_test: Crash # Issue dartbug.com/29331 diff --git a/tests/language_2/language_2_vm.status b/tests/language_2/language_2_vm.status index 34696df705b..bfc405c7f16 100644 --- a/tests/language_2/language_2_vm.status +++ b/tests/language_2/language_2_vm.status @@ -474,6 +474,9 @@ regress_23089_test: MissingCompileTimeError regress_23408_test: RuntimeError regress_27572_test: MissingCompileTimeError regress_26133_test: MissingCompileTimeError +regress_28341_test: Fail # Issue 28340 +return_type_test: MissingCompileTimeError +rewrite_implicit_this_test/01: MissingCompileTimeError setter_override2_test/none: CompileTimeError setter4_test: MissingCompileTimeError # Issue 14736 static_field1_test/01: MissingCompileTimeError diff --git a/tests/language_2/regress_28278_test.dart b/tests/language_2/regress_28278_test.dart new file mode 100644 index 00000000000..e65ef081ed1 --- /dev/null +++ b/tests/language_2/regress_28278_test.dart @@ -0,0 +1,25 @@ +// Copyright (c) 2017, 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. +// VMOptions=--load-deferred-eagerly +// VMOptions= + +import "package:expect/expect.dart"; + +import "regress_28278_lib.dart" deferred as def; + +var result = ""; + +class D { + m() async { + await def.loadLibrary(); + result = def.foo(result += "Here"); + } +} + +main() async { + var d = new D(); + await d.m(); + await d.m(); + Expect.equals("HereHelloHereHello", result); +} diff --git a/tests/language_2/regress_28341_test.dart b/tests/language_2/regress_28341_test.dart new file mode 100644 index 00000000000..c43d594ca69 --- /dev/null +++ b/tests/language_2/regress_28341_test.dart @@ -0,0 +1,12 @@ +// Copyright (c) 2017, 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"; + +enum E { A } + +main() { + Expect.isTrue(E.values == const [E.A]); + Expect.isTrue(E.values == const [E.A]); +} diff --git a/tests/language_2/regress_28610_test.dart b/tests/language_2/regress_28610_test.dart new file mode 100644 index 00000000000..adefd32dcbb --- /dev/null +++ b/tests/language_2/regress_28610_test.dart @@ -0,0 +1,14 @@ +// Copyright (c) 2017, 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 { + final int Function = 0; +} + +main() { + final int Function = 0; + Expect.equals(Function, new A().Function); +} diff --git a/tests/language_2/regress_29025_test.dart b/tests/language_2/regress_29025_test.dart new file mode 100644 index 00000000000..c68f17afa56 --- /dev/null +++ b/tests/language_2/regress_29025_test.dart @@ -0,0 +1,30 @@ +// Copyright (c) 2017, 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. + +typedef T F(T t); + +class B> {} + +class C>> {} + +class D extends B { + D foo(D x) => x; + D call(D x) => x; + D bar(D x) => x; +} + +class E extends C { + C foo(C x) => x; + C call(C x) => x; + C bar(C x) => x; +} + +main() { + F fd = new D(); + var d = fd(fd); + print(d); + F fe = new E(); + var e = fe(fe); + print(e); +} diff --git a/tests/language_2/regress_29243_test.dart b/tests/language_2/regress_29243_test.dart new file mode 100644 index 00000000000..60b0cb7c4ec --- /dev/null +++ b/tests/language_2/regress_29243_test.dart @@ -0,0 +1,12 @@ +// Copyright (c) 2017, 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 Function() x = () => 42; +int Function(int Function()) y = (int Function() x) => x(); +List l = [()=>42, x]; +main() { + Expect.equals(42, y(l[1])); +} diff --git a/tests/language_2/regress_29349_test.dart b/tests/language_2/regress_29349_test.dart new file mode 100644 index 00000000000..9af1a9d8bdd --- /dev/null +++ b/tests/language_2/regress_29349_test.dart @@ -0,0 +1,13 @@ +// Copyright (c) 2017, 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. +// +// VMOptions=--generic-method-syntax + +List get(T item) => [item]; +List get2(T item) => [item]; + +void main() { + print(get(1)); + print(get2(1)); +} diff --git a/tests/language_2/regress_29357_test.dart b/tests/language_2/regress_29357_test.dart new file mode 100644 index 00000000000..3777e3cc223 --- /dev/null +++ b/tests/language_2/regress_29357_test.dart @@ -0,0 +1,18 @@ +// Copyright (c) 2017, 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. + +abstract class A> {} + +abstract class B> {} + +class C extends B> {} + +class D extends A> {} + +main() { + new D(); + new C(); + new D(); + new C(); +} diff --git a/tests/language_2/regress_29405_test.dart b/tests/language_2/regress_29405_test.dart new file mode 100644 index 00000000000..49077169764 --- /dev/null +++ b/tests/language_2/regress_29405_test.dart @@ -0,0 +1,12 @@ +// Copyright (c) 2017, 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. + +class Foo { + void call(void callback(Foo foo)) {} +} + +main() { + Foo foo = new Foo(); + foo(foo); +} diff --git a/tests/language_2/regress_29949_test.dart b/tests/language_2/regress_29949_test.dart new file mode 100644 index 00000000000..8685fae643c --- /dev/null +++ b/tests/language_2/regress_29949_test.dart @@ -0,0 +1,15 @@ +// Copyright (c) 2017, 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. + +abstract class S {} + +abstract class M {} + +abstract class N {} + +class C extends S with M>, N> {} + +main() { + new C(); +} diff --git a/tests/language_2/regress_30092_test.dart b/tests/language_2/regress_30092_test.dart new file mode 100644 index 00000000000..46ff3cdf48d --- /dev/null +++ b/tests/language_2/regress_30092_test.dart @@ -0,0 +1,13 @@ +// Copyright (c) 2017, 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. + +class BigInt {} + +main() { + void foo(void Function(BigInt, BigInt) f) { + f(new BigInt(), new BigInt()); + } + + foo((x, y) {}); +} diff --git a/tests/language_2/regress_30121_test.dart b/tests/language_2/regress_30121_test.dart new file mode 100644 index 00000000000..99451f5eb0f --- /dev/null +++ b/tests/language_2/regress_30121_test.dart @@ -0,0 +1,18 @@ +// Copyright (c) 2017, 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. + +class Mock { + noSuchMethod(i) {} +} + +class Foo { + int call() => 1; +} + +class MockFoo extends Mock implements Foo {} + +main() { + var foo = new MockFoo(); + foo(); +} diff --git a/tests/language_strong/regress_30669_test.dart b/tests/language_2/regress_30669_test.dart similarity index 95% rename from tests/language_strong/regress_30669_test.dart rename to tests/language_2/regress_30669_test.dart index 8a7f396cfc3..967ee54972e 100644 --- a/tests/language_strong/regress_30669_test.dart +++ b/tests/language_2/regress_30669_test.dart @@ -29,5 +29,5 @@ main() { testComparable(Comparable c) { Expect.equals(c.compareTo(42), 1, '$c'); Expect.equals(c.compareTo(41), -1, '$c'); - Expect.throwsTypeError(() => c.compareTo('42')); + Expect.throws(() => c.compareTo('42')); } diff --git a/tests/language_strong/regress_30927_test.dart b/tests/language_2/regress_30927_test.dart similarity index 100% rename from tests/language_strong/regress_30927_test.dart rename to tests/language_2/regress_30927_test.dart diff --git a/tests/language_strong/regress_r24720_test.dart b/tests/language_2/regress_r24720_test.dart similarity index 100% rename from tests/language_strong/regress_r24720_test.dart rename to tests/language_2/regress_r24720_test.dart diff --git a/tests/language_strong/reify_typevar_static_test.dart b/tests/language_2/reify_typevar_static_test.dart similarity index 100% rename from tests/language_strong/reify_typevar_static_test.dart rename to tests/language_2/reify_typevar_static_test.dart diff --git a/tests/language_strong/reify_typevar_test.dart b/tests/language_2/reify_typevar_test.dart similarity index 100% rename from tests/language_strong/reify_typevar_test.dart rename to tests/language_2/reify_typevar_test.dart diff --git a/tests/language_strong/resolution_test.dart b/tests/language_2/resolution_test.dart similarity index 100% rename from tests/language_strong/resolution_test.dart rename to tests/language_2/resolution_test.dart diff --git a/tests/language_strong/resolve_test.dart b/tests/language_2/resolve_test.dart similarity index 100% rename from tests/language_strong/resolve_test.dart rename to tests/language_2/resolve_test.dart diff --git a/tests/language_strong/rethrow_test.dart b/tests/language_2/rethrow_test.dart similarity index 100% rename from tests/language_strong/rethrow_test.dart rename to tests/language_2/rethrow_test.dart diff --git a/tests/language_strong/return_in_loop_test.dart b/tests/language_2/return_in_loop_test.dart similarity index 100% rename from tests/language_strong/return_in_loop_test.dart rename to tests/language_2/return_in_loop_test.dart diff --git a/tests/language_strong/return_this_type_test.dart b/tests/language_2/return_this_type_test.dart similarity index 100% rename from tests/language_strong/return_this_type_test.dart rename to tests/language_2/return_this_type_test.dart diff --git a/tests/language_2/return_type_test.dart b/tests/language_2/return_type_test.dart new file mode 100644 index 00000000000..99060b5385a --- /dev/null +++ b/tests/language_2/return_type_test.dart @@ -0,0 +1,15 @@ +// 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 returnString1() => 's'; /*@compile-error=unspecified*/ +void returnNull() => null; +void returnString2() => 's'; /*@compile-error=unspecified*/ + +main() { + returnString1(); + returnNull(); + returnString2(); +} diff --git a/tests/language_strong/rewrite_assign_test.dart b/tests/language_2/rewrite_assign_test.dart similarity index 100% rename from tests/language_strong/rewrite_assign_test.dart rename to tests/language_2/rewrite_assign_test.dart diff --git a/tests/language_strong/rewrite_compound_assign_test.dart b/tests/language_2/rewrite_compound_assign_test.dart similarity index 100% rename from tests/language_strong/rewrite_compound_assign_test.dart rename to tests/language_2/rewrite_compound_assign_test.dart diff --git a/tests/language_strong/rewrite_conditional_test.dart b/tests/language_2/rewrite_conditional_test.dart similarity index 100% rename from tests/language_strong/rewrite_conditional_test.dart rename to tests/language_2/rewrite_conditional_test.dart diff --git a/tests/language_strong/rewrite_for_update_order_test.dart b/tests/language_2/rewrite_for_update_order_test.dart similarity index 100% rename from tests/language_strong/rewrite_for_update_order_test.dart rename to tests/language_2/rewrite_for_update_order_test.dart diff --git a/tests/language_strong/rewrite_if_empty_then_test.dart b/tests/language_2/rewrite_if_empty_then_test.dart similarity index 100% rename from tests/language_strong/rewrite_if_empty_then_test.dart rename to tests/language_2/rewrite_if_empty_then_test.dart diff --git a/tests/language_strong/rewrite_if_return_test.dart b/tests/language_2/rewrite_if_return_test.dart similarity index 100% rename from tests/language_strong/rewrite_if_return_test.dart rename to tests/language_2/rewrite_if_return_test.dart diff --git a/tests/language_strong/rewrite_if_swap_test.dart b/tests/language_2/rewrite_if_swap_test.dart similarity index 100% rename from tests/language_strong/rewrite_if_swap_test.dart rename to tests/language_2/rewrite_if_swap_test.dart diff --git a/tests/language_strong/rewrite_implicit_this_test.dart b/tests/language_2/rewrite_implicit_this_test.dart similarity index 98% rename from tests/language_strong/rewrite_implicit_this_test.dart rename to tests/language_2/rewrite_implicit_this_test.dart index 6fcba68d82e..90600b2deee 100644 --- a/tests/language_strong/rewrite_implicit_this_test.dart +++ b/tests/language_2/rewrite_implicit_this_test.dart @@ -10,7 +10,7 @@ class Foo { String x = 'x'; easy(z) { - return x + y + z; //# 01: static type warning + return x + y + z; //# 01: compile-time error } // Shadow the 'y' field in various ways diff --git a/tests/language_strong/rewrite_logical_test.dart b/tests/language_2/rewrite_logical_test.dart similarity index 100% rename from tests/language_strong/rewrite_logical_test.dart rename to tests/language_2/rewrite_logical_test.dart diff --git a/tests/language_strong/language_strong.status b/tests/language_strong/language_strong.status index 885607a5847..b27c408215e 100644 --- a/tests/language_strong/language_strong.status +++ b/tests/language_strong/language_strong.status @@ -169,6 +169,13 @@ regress_21912_test: Skip regress_22438_test: Skip return_type_test: Skip rewrite_implicit_this_test: Skip +setter4_test: Skip +setter_declaration2_negative_test: Skip +setter_declaration_negative_test: Skip +setter_no_getter_call_test: Skip +setter_override2_test: Skip +setter_override_test: Skip +source_self_negative_test: Skip super_operator_index6_test: Skip super_operator_index7_test: Skip super_operator_index8_test: Skip @@ -215,11 +222,9 @@ field3a_negative_test: StaticWarning # Issue 28823 interface_inherit_field_test: StaticWarning # Issue 28823 internal_library_test/02: MissingStaticWarning # Issue 28823 no_main_test/01: MissingStaticWarning # Issue 28823 -reify_typevar_static_test/00: MissingCompileTimeError # Issue 28823 super_setter_test: StaticWarning # Issue 28823 [ $compiler == dartdevc ] -reify_typevar_static_test/00: MissingCompileTimeError # Issue 29920 [ $compiler == dartdevc && $runtime != none ] async_star_cancel_while_paused_test: RuntimeError # Issue 29920 diff --git a/tests/language_strong/language_strong_kernel.status b/tests/language_strong/language_strong_kernel.status index b00de3d720d..16f4c14acb6 100644 --- a/tests/language_strong/language_strong_kernel.status +++ b/tests/language_strong/language_strong_kernel.status @@ -32,4 +32,5 @@ redirecting_factory_reflection_test: RuntimeError regress_r24720_test: RuntimeError reify_typevar_static_test/00: MissingCompileTimeError reify_typevar_test: RuntimeError +setter_no_getter_test/01: Crash # VM does not support BottomType sync_generator3_test/test2: RuntimeError diff --git a/tests/language_strong/return_type_test.dart b/tests/language_strong/return_type_test.dart deleted file mode 100644 index a2137bb0ca4..00000000000 --- a/tests/language_strong/return_type_test.dart +++ /dev/null @@ -1,31 +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"; - -isCheckedMode() { - try { - var i = 1; - String s = i; - return false; - } catch (e) { - return true; - } -} - -int returnString1() => 's'; -void returnNull() => null; -void returnString2() => 's'; - -main() { - if (isCheckedMode()) { - Expect.throws(returnString1, (e) => e is TypeError); - Expect.throws(returnString2, (e) => e is TypeError); - returnNull(); - } else { - returnString1(); - returnNull(); - returnString2(); - } -}