Migrated test block 60 to Dart 2.0, take 2
Original review at https://dart-review.googlesource.com/c/sdk/+/7160 Change-Id: If2aeecec04640bee3b622d97c8fcdd6cb1bdd369 Reviewed-on: https://dart-review.googlesource.com/8731 Commit-Queue: Jaime Wren <jwren@google.com> Reviewed-by: Janice Collins <jcollins@google.com> Reviewed-by: Jaime Wren <jwren@google.com>
This commit is contained in:
committed by
commit-bot@chromium.org
parent
db15f5d73b
commit
3d020fa91e
+2
-2
@@ -13,11 +13,11 @@ class A extends C {
|
||||
|
||||
class C {
|
||||
foo() {
|
||||
print(a); //# 01: static type warning
|
||||
print(a); //# 01: compile-time error
|
||||
return a; //# 01: continued
|
||||
}
|
||||
bar() {
|
||||
print(b.a); //# 02: static type warning
|
||||
print(b.a); //# 02: compile-time error
|
||||
return b.a; //# 02: continued
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -12,7 +12,7 @@ void main() {
|
||||
// Should still be available because it is not a member of dart:core.
|
||||
Expect.isTrue(dynamic is mycore.Type);
|
||||
|
||||
Expect.throws(() => mycore.dynamic is mycore.Type, // //# 01: static type warning
|
||||
Expect.throws(() => mycore.dynamic is mycore.Type, // //# 01: compile-time error
|
||||
(e) => e is mycore.NoSuchMethodError, // //# 01: continued
|
||||
'dynamic is not a member of dart:core'); //# 01: continued
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
// Copyright (c) 2016, 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.
|
||||
// Third dart test program.
|
||||
|
||||
import "dart:math";
|
||||
|
||||
main() {
|
||||
// This should no longer cause a warning because the least-upper-bound
|
||||
// of List<int> and Set<int> is Object.
|
||||
// The LUB is now EfficientLengthIterable and it extends Iterable.
|
||||
var x = (new Random().nextBool() // Unpredictable condition.
|
||||
? <int>[1]
|
||||
: new Set<int>.from([1]))
|
||||
.first;
|
||||
if (x != 1) throw "Wat?";
|
||||
}
|
||||
+1
-1
@@ -11,7 +11,7 @@ class EmptyBlockCaseTest {
|
||||
var exception = null;
|
||||
try {
|
||||
switch (1) {
|
||||
case 1:
|
||||
case 1: /*@compile-error=unspecified*/
|
||||
{}
|
||||
case 2:
|
||||
Expect.equals(true, false);
|
||||
@@ -0,0 +1,5 @@
|
||||
// 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.
|
||||
|
||||
library empty_library;
|
||||
+1
-1
@@ -18,5 +18,5 @@ enum Enum1 {
|
||||
main() {
|
||||
Expect.equals('Enum1._A,Enum1._B', Enum1.values.join(','));
|
||||
Expect.equals('Enum2._A,Enum2._B', Enum2.values.join(',')); //# 01: ok
|
||||
Expect.throws(() => Enum2._A, (e) => e is NoSuchMethodError); //# 02: static type warning
|
||||
Expect.throws(() => Enum2._A, (e) => e is NoSuchMethodError); //# 02: compile-time error
|
||||
}
|
||||
@@ -4,8 +4,6 @@
|
||||
|
||||
// Basic syntax test for enumeration types
|
||||
|
||||
import 'package:expect/expect.dart';
|
||||
|
||||
enum Color { red, orange, yellow, green }
|
||||
|
||||
// Additional comma at end of list is ok.
|
||||
@@ -12,6 +12,7 @@ enum Enum4 {
|
||||
E,
|
||||
}
|
||||
enum Enum5 { F, G, H }
|
||||
enum _Enum6 { I, _J }
|
||||
|
||||
enum _IsNot { IsNot }
|
||||
|
||||
@@ -39,6 +40,7 @@ main() {
|
||||
Expect.equals('Enum2.A', Enum2.A.toString());
|
||||
Expect.equals(0, Enum2.A.index);
|
||||
Expect.listEquals([Enum2.A], Enum2.values);
|
||||
Expect.identical(const <Enum2>[Enum2.A], Enum2.values);
|
||||
Enum2.values.forEach(test2);
|
||||
|
||||
Expect.equals('Enum3.B', Enum3.B.toString());
|
||||
@@ -63,6 +65,9 @@ main() {
|
||||
Expect.equals(2, Enum5.H.index);
|
||||
Expect.listEquals([Enum5.F, Enum5.G, Enum5.H], Enum5.values);
|
||||
Enum5.values.forEach(test5);
|
||||
|
||||
Expect.equals('_Enum6.I', _Enum6.I.toString());
|
||||
Expect.equals('_Enum6._J', _Enum6._J.toString());
|
||||
}
|
||||
|
||||
test1(Enum1 e) {
|
||||
+5
-5
@@ -93,13 +93,13 @@ class Helper3 {
|
||||
func5();
|
||||
} on MyException catch (e) {
|
||||
i = 300;
|
||||
try {
|
||||
try {// //# 00: continued
|
||||
// There should be no stackTrace in this normal exception object.
|
||||
// We should get a NoSuchMethodError.
|
||||
var trace = e.stackTrace; //# static type warning
|
||||
} on NoSuchMethodError catch (e) {
|
||||
Expect.isNotNull(e.stackTrace, "Error needs a stackTrace on throw");
|
||||
}
|
||||
var trace = e.stackTrace; // //# 00: compile-time error
|
||||
} on NoSuchMethodError catch (e) {// //# 00: continued
|
||||
Expect.isNotNull(e.stackTrace, "Error needs a stackTrace on throw");// //# 00: continued
|
||||
}// //# 00: continued
|
||||
}
|
||||
return i;
|
||||
}
|
||||
+3
-3
@@ -23,9 +23,9 @@ class A {
|
||||
|
||||
class B extends A {
|
||||
B(this.a, int y, int z)
|
||||
: super(rec(1)),
|
||||
z = rec(3),
|
||||
y = rec(4) {
|
||||
: z = rec(3),
|
||||
y = rec(4),
|
||||
super(rec(1)) {
|
||||
rec(6);
|
||||
}
|
||||
int a;
|
||||
@@ -94,6 +94,10 @@ deferred_constraints_type_annotation_test/type_annotation_generic4: MissingCompi
|
||||
deferred_constraints_type_annotation_test/type_annotation_null: MissingCompileTimeError
|
||||
deferred_constraints_type_annotation_test/type_annotation_top_level: MissingCompileTimeError
|
||||
deferred_inheritance_constraints_test/redirecting_constructor: MissingCompileTimeError
|
||||
dynamic_field_test/01: MissingCompileTimeError
|
||||
dynamic_field_test/02: MissingCompileTimeError
|
||||
dynamic_prefix_core_test/01: MissingCompileTimeError
|
||||
enum_private_test/02: MissingCompileTimeError
|
||||
for_in3_test: MissingCompileTimeError
|
||||
for_in_side_effects_test/01: MissingCompileTimeError
|
||||
generic_methods_bounds_test/01: MissingCompileTimeError
|
||||
@@ -356,6 +360,10 @@ deferred_constraints_type_annotation_test/type_annotation_generic4: MissingCompi
|
||||
deferred_constraints_type_annotation_test/type_annotation_null: MissingCompileTimeError
|
||||
deferred_constraints_type_annotation_test/type_annotation_top_level: MissingCompileTimeError
|
||||
deferred_inheritance_constraints_test/redirecting_constructor: MissingCompileTimeError
|
||||
dynamic_field_test/01: MissingCompileTimeError
|
||||
dynamic_field_test/02: MissingCompileTimeError
|
||||
dynamic_prefix_core_test/01: MissingCompileTimeError
|
||||
enum_private_test/02: MissingCompileTimeError
|
||||
for_in3_test: MissingCompileTimeError
|
||||
for_in_side_effects_test/01: MissingCompileTimeError
|
||||
generic_list_checked_test: CompileTimeError
|
||||
@@ -518,6 +526,9 @@ deep_nesting1_negative_test: CompileTimeError # Issue 25558
|
||||
deep_nesting2_negative_test: CompileTimeError # Issue 25558
|
||||
duplicate_export_negative_test: CompileTimeError
|
||||
duplicate_interface_negative_test: CompileTimeError
|
||||
emit_const_fields_test: CompileTimeError
|
||||
enum_syntax_test/05: Fail # Issue 21649
|
||||
enum_syntax_test/06: Fail # Issue 21649
|
||||
generic_methods_generic_function_parameter_test: CompileTimeError # Issue 28515
|
||||
generic_local_functions_test: CompileTimeError # Issue 28515
|
||||
generic_list_checked_test: StaticWarning
|
||||
@@ -597,6 +608,7 @@ bit_operations_test/01: MissingStaticWarning # Issue 28823
|
||||
bit_operations_test/02: MissingStaticWarning # Issue 28823
|
||||
bit_operations_test/03: MissingStaticWarning # Issue 28823
|
||||
bit_operations_test/04: MissingStaticWarning # Issue 28823
|
||||
error_stacktrace_test/00: Pass
|
||||
generic_list_checked_test: CompileTimeError
|
||||
generic_methods_generic_function_result_test/none: CompileTimeError # Issue #30207
|
||||
generic_methods_test: CompileTimeError
|
||||
@@ -844,6 +856,8 @@ vm/type_vm_test: StaticWarning
|
||||
assertion_initializer_const_error2_test/none: CompileTimeError
|
||||
assertion_initializer_const_function_test/01: CompileTimeError
|
||||
assertion_initializer_test: CompileTimeError
|
||||
error_stacktrace_test/00: MissingCompileTimeError
|
||||
vm/lazy_deopt_with_exception_test: CompileTimeError
|
||||
|
||||
[ $compiler == dart2analyzer && $strong ]
|
||||
generic_methods_overriding_test/01: MissingCompileTimeError # Issue 29070
|
||||
|
||||
@@ -119,6 +119,13 @@ cyclic_typedef_test/13: MissingCompileTimeError
|
||||
default_factory2_test/01: MissingCompileTimeError
|
||||
default_factory_test/01: MissingCompileTimeError
|
||||
deferred_inheritance_constraints_test/redirecting_constructor: MissingCompileTimeError
|
||||
dynamic_field_test/01: MissingCompileTimeError
|
||||
dynamic_field_test/02: MissingCompileTimeError
|
||||
dynamic_prefix_core_test/01: MissingCompileTimeError
|
||||
empty_block_case_test: MissingCompileTimeError
|
||||
enum_private_test/02: MissingCompileTimeError
|
||||
error_stacktrace_test/00: MissingCompileTimeError
|
||||
example_constructor_test: RuntimeError
|
||||
generic_constructor_mixin_test/01: MissingCompileTimeError
|
||||
generic_constructor_mixin2_test/01: MissingCompileTimeError
|
||||
generic_constructor_mixin3_test/01: MissingCompileTimeError
|
||||
@@ -395,6 +402,7 @@ deferred_constraints_type_annotation_test/type_annotation_null: MissingCompileTi
|
||||
deferred_constraints_type_annotation_test/type_annotation_top_level: MissingCompileTimeError
|
||||
deferred_not_loaded_check_test: Fail # Issue 27577
|
||||
double_int_to_string_test: RuntimeError # Issue 1533
|
||||
enum_test: Fail # Issue 28340
|
||||
generalized_void_syntax_test: CompileTimeError # Issue #30176.
|
||||
generic_field_mixin4_test: Crash # Issue 18651
|
||||
generic_field_mixin5_test: Crash # Issue 18651
|
||||
@@ -552,6 +560,7 @@ deferred_constraints_type_annotation_test/as_operation: Crash # Issue 27394
|
||||
deferred_inheritance_constraints_test/mixin: Crash # Issue 27394
|
||||
deferred_load_constants_test/none: RuntimeError # Issue 27394
|
||||
deferred_super_dependency_test/01: Crash # Issue 27394
|
||||
enum_mirror_test: Crash # Issue 27394
|
||||
generalized_void_syntax_test: Crash # Issue #30176
|
||||
generic_field_mixin2_test: Crash # Issue 27394
|
||||
generic_field_mixin3_test: Crash # Issue 27394
|
||||
@@ -821,6 +830,10 @@ deferred_type_dependency_test/as: CompileTimeError
|
||||
deferred_type_dependency_test/is: CompileTimeError
|
||||
deferred_type_dependency_test/none: CompileTimeError
|
||||
deferred_type_dependency_test/type_annotation: CompileTimeError
|
||||
dynamic_prefix_core_test/01: RuntimeError
|
||||
dynamic_prefix_core_test/none: RuntimeError
|
||||
enum_mirror_test: RuntimeError
|
||||
example_constructor_test: RuntimeError
|
||||
execute_finally7_test: RuntimeError
|
||||
function_subtype_bound_closure3_test: RuntimeError
|
||||
function_subtype_bound_closure4_test: RuntimeError
|
||||
@@ -1083,9 +1096,13 @@ duplicate_implements_test/01: MissingCompileTimeError
|
||||
duplicate_implements_test/02: MissingCompileTimeError
|
||||
duplicate_implements_test/03: MissingCompileTimeError
|
||||
duplicate_implements_test/04: MissingCompileTimeError
|
||||
dynamic_prefix_core_test/01: RuntimeError
|
||||
dynamic_prefix_core_test/none: RuntimeError
|
||||
execute_finally7_test: RuntimeError
|
||||
full_stacktrace1_test: RuntimeError
|
||||
full_stacktrace2_test: RuntimeError
|
||||
enum_mirror_test: RuntimeError
|
||||
example_constructor_test: RuntimeError
|
||||
function_subtype_bound_closure3_test: RuntimeError
|
||||
function_subtype_bound_closure4_test: RuntimeError
|
||||
function_subtype_bound_closure7_test: RuntimeError
|
||||
@@ -1313,6 +1330,7 @@ instance_creation_in_function_annotation_test: Fail # mirrors not supported
|
||||
deferred_constraints_constants_test/none: Fail # mirrors not supported
|
||||
deferred_constraints_constants_test/reference_after_load: Fail # mirrors not supported
|
||||
deferred_constraints_constants_test: Pass # mirrors not supported, passes for the wrong reason
|
||||
enum_mirror_test: Fail # mirrors not supported
|
||||
invocation_mirror2_test: Fail # mirrors not supported
|
||||
invocation_mirror_invoke_on2_test: Fail # mirrors not supported
|
||||
invocation_mirror_invoke_on_test: Fail # mirrors not supported
|
||||
|
||||
@@ -191,12 +191,18 @@ deferred_not_loaded_check_test: RuntimeError # Issue 27777
|
||||
deferred_redirecting_factory_test: RuntimeError # Issue 27777
|
||||
deferred_static_seperate_test: RuntimeError # Issue 27777
|
||||
double_to_string_as_fixed2_test/none: RuntimeError # Issue 29920
|
||||
dynamic_test: RuntimeError # Strong mode is-check failure: M1 does not soundly subtype Iface<dynamic, num>
|
||||
execute_finally6_test: RuntimeError # Issue 29920
|
||||
flatten_test/05: MissingRuntimeError # Issue 29920
|
||||
flatten_test/08: MissingRuntimeError # Issue 29920
|
||||
flatten_test/09: MissingRuntimeError # Issue 29920
|
||||
flatten_test/12: MissingRuntimeError # Issue 29920
|
||||
for_variable_capture_test: RuntimeError # Issue 29920
|
||||
emit_const_fields_test: CompileTimeError
|
||||
enum_syntax_test/05: MissingCompileTimeError
|
||||
enum_syntax_test/06: MissingCompileTimeError
|
||||
example_constructor_test: RuntimeError
|
||||
exception_test: RuntimeError # DDC doesn't implement NullThrownError?
|
||||
function_subtype_inline2_test: RuntimeError
|
||||
function_type/function_type50_test: RuntimeError # Issue 29920
|
||||
function_type/function_type58_test: RuntimeError # Issue 29920
|
||||
|
||||
@@ -65,6 +65,7 @@ deferred_type_dependency_test/is: Skip # Timeout
|
||||
deferred_type_dependency_test/none: Skip # Timeout
|
||||
deferred_type_dependency_test/as: Skip # Timeout
|
||||
deferred_type_dependency_test/type_annotation: Skip # Timeout
|
||||
enum_mirror_test: CompileTimeError
|
||||
generic_function_typedef2_test/04: CompileTimeError
|
||||
instance_creation_in_function_annotation_test: CompileTimeError
|
||||
invocation_mirror_invoke_on_test: CompileTimeError
|
||||
|
||||
@@ -277,6 +277,7 @@ deferred_type_dependency_test/as: CompileTimeError # Fasta/KernelVM bug: Deferre
|
||||
deferred_type_dependency_test/is: CompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 28335.
|
||||
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.
|
||||
function_type/function_type0_test: RuntimeError
|
||||
function_type/function_type10_test: RuntimeError
|
||||
function_type/function_type11_test: RuntimeError
|
||||
@@ -429,7 +430,6 @@ vm/optimized_stacktrace_test: Crash
|
||||
vm/regress_27671_test: Crash
|
||||
vm/type_vm_test: Crash
|
||||
|
||||
|
||||
[ ($compiler == dartkp) && !$checked ]
|
||||
generic_field_mixin6_test/none: RuntimeError
|
||||
|
||||
@@ -443,6 +443,7 @@ cyclic_type_test/02: Fail, OK
|
||||
cyclic_type_test/04: Fail, OK
|
||||
cyclic_type2_test: Fail, OK
|
||||
duplicate_export_negative_test: Fail # Issue 6134
|
||||
example_constructor_test: Fail, OK
|
||||
|
||||
[ ($compiler == dartk || $compiler == dartkp) && $mode == debug ]
|
||||
cyclic_type_variable_test/01: Crash
|
||||
|
||||
@@ -129,6 +129,14 @@ deferred_constraints_type_annotation_test/type_annotation_generic4: MissingCompi
|
||||
deferred_constraints_type_annotation_test/type_annotation_null: MissingCompileTimeError
|
||||
deferred_constraints_type_annotation_test/type_annotation_top_level: MissingCompileTimeError
|
||||
deferred_inheritance_constraints_test/redirecting_constructor: MissingCompileTimeError
|
||||
dynamic_field_test/01: MissingCompileTimeError
|
||||
dynamic_field_test/02: MissingCompileTimeError
|
||||
dynamic_prefix_core_test/01: MissingCompileTimeError
|
||||
dynamic_prefix_core_test/none: RuntimeError
|
||||
empty_block_case_test: MissingCompileTimeError
|
||||
enum_mirror_test: SkipByDesign
|
||||
enum_private_test/02: MissingCompileTimeError
|
||||
error_stacktrace_test/00: MissingCompileTimeError
|
||||
generic_closure_test: RuntimeError
|
||||
generic_field_mixin6_test/01: MissingCompileTimeError
|
||||
generic_function_bounds_test: RuntimeError
|
||||
@@ -481,8 +489,9 @@ generic_field_mixin6_test/none: RuntimeError
|
||||
|
||||
[ $compiler == none || $compiler == precompiler || $compiler == app_jit ]
|
||||
async_star_regression_2238_test: CompileTimeError, RuntimeError
|
||||
multiline_strings_test: Fail # Issue 23020
|
||||
deferred_redirecting_factory_test: Fail, Crash # Issue 23408
|
||||
dynamic_prefix_core_test/01: RuntimeError # Issue 12478
|
||||
multiline_strings_test: Fail # Issue 23020
|
||||
|
||||
# These test entries will be valid for vm (with and without kernel).
|
||||
[ $runtime == dart_precompiled ]
|
||||
@@ -530,6 +539,9 @@ large_class_declaration_test: SkipSlow # Uses too much memory.
|
||||
|
||||
[ $runtime == dart_precompiled && $minified ]
|
||||
cyclic_type_test/*: Skip
|
||||
enum_duplicate_test/*: Skip # Uses Enum.toString()
|
||||
enum_private_test/*: Skip # Uses Enum.toString()
|
||||
enum_test: Skip # Uses Enum.toString()
|
||||
full_stacktrace1_test: Skip
|
||||
full_stacktrace2_test: Skip
|
||||
|
||||
|
||||
@@ -135,6 +135,13 @@ deferred_constraints_type_annotation_test/type_annotation_generic4: MissingCompi
|
||||
deferred_constraints_type_annotation_test/type_annotation_null: MissingCompileTimeError
|
||||
deferred_constraints_type_annotation_test/type_annotation_top_level: MissingCompileTimeError
|
||||
deferred_inheritance_constraints_test/redirecting_constructor: MissingCompileTimeError
|
||||
dynamic_field_test/01: MissingCompileTimeError
|
||||
dynamic_field_test/02: MissingCompileTimeError
|
||||
dynamic_prefix_core_test/01: MissingCompileTimeError
|
||||
dynamic_prefix_core_test/none: RuntimeError
|
||||
empty_block_case_test: MissingCompileTimeError
|
||||
enum_private_test/02: MissingCompileTimeError
|
||||
error_stacktrace_test/00: MissingCompileTimeError
|
||||
flatten_test/05: MissingRuntimeError
|
||||
flatten_test/08: MissingRuntimeError
|
||||
flatten_test/09: MissingRuntimeError
|
||||
|
||||
@@ -70,6 +70,13 @@ enum_private_test: Skip
|
||||
enum_syntax_test: Skip
|
||||
error_stacktrace_test: Skip
|
||||
example_constructor_test: Skip
|
||||
double_to_string_as_exponential2_test: Skip
|
||||
double_to_string_as_fixed2_test: Skip
|
||||
double_to_string_as_precision2_test: Skip
|
||||
duplicate_constructor_test: Skip
|
||||
duplicate_export_negative_test: Skip
|
||||
duplicate_implements_test: Skip
|
||||
duplicate_interface_negative_test: Skip
|
||||
export_ambiguous_main_negative_test: Skip
|
||||
extend_type_parameter2_negative_test: Skip
|
||||
extend_type_parameter_negative_test: Skip
|
||||
@@ -423,6 +430,8 @@ call_closurization_test: RuntimeError # Issue 29920
|
||||
const_evaluation_test/01: RuntimeError # Issue 29920
|
||||
dynamic_test: RuntimeError # Strong mode is-check failure: M1 does not soundly subtype Iface<dynamic, num>
|
||||
exception_test: RuntimeError # DDC doesn't implement NullThrownError?
|
||||
double_int_to_string_test: RuntimeError # Issue 29920
|
||||
execute_finally6_test: RuntimeError # Issue 29920
|
||||
expect_test: RuntimeError # Issue 29920
|
||||
f_bounded_quantification3_test: RuntimeError # Issue 29920
|
||||
field_increment_bailout_test: RuntimeError # Issue 29920
|
||||
|
||||
@@ -19,12 +19,6 @@ conditional_import_string_test: DartkCompileTimeError
|
||||
conditional_import_test: DartkCompileTimeError
|
||||
const_evaluation_test/01: RuntimeError
|
||||
const_locals_test: RuntimeError
|
||||
enum_duplicate_test/01: RuntimeError
|
||||
enum_duplicate_test/02: RuntimeError
|
||||
enum_duplicate_test/none: RuntimeError
|
||||
enum_mirror_test: RuntimeError
|
||||
enum_test: RuntimeError
|
||||
evaluation_redirecting_constructor_test: RuntimeError
|
||||
export_double_same_main_test: DartkCrash
|
||||
export_main_test: DartkCrash
|
||||
f_bounded_equality_test: RuntimeError
|
||||
|
||||
Reference in New Issue
Block a user