Convert a batch of negative tests to multitests.

Change-Id: I380c12ef633ec8c40de982782623d3e3659a4834
Reviewed-on: https://dart-review.googlesource.com/57162
Reviewed-by: Leaf Petersen <leafp@google.com>
This commit is contained in:
Bob Nystrom 2018-06-08 19:43:34 +00:00
parent ec5a848588
commit 67525aef37
19 changed files with 10075 additions and 10112 deletions

View file

@ -1,23 +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 mismatch in argument counts.
class ConstructorCallWrongArgumentCountNegativeTest {
static void testMain() {
Stockhorn nh = new Stockhorn(1);
nh.goodCall(1, 2, 3);
nh = new Stockhorn();
}
}
class Stockhorn {
Stockhorn(int a) {}
int goodCall(int a, int b, int c) {
return a + b;
}
}
main() {
ConstructorCallWrongArgumentCountNegativeTest.testMain();
}

View file

@ -0,0 +1,12 @@
// 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.
class Stockhorn {
Stockhorn(int a);
}
main() {
new Stockhorn(1);
new Stockhorn(); //# 01: compile-time error
}

View file

@ -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.
// Redirection constructors must not be cyclic.
class A {
var x;
A(x) : this.named(x, 0); //# none: compile-time error
A.named(x, int y) : this(x + y); //# 01: compile-time error
}
class ConstructorRedirect1NegativeTest {
static testMain() {
new A(10);
}
}
main() {
ConstructorRedirect1NegativeTest.testMain();
}

View file

@ -5,15 +5,11 @@
class A {
var x;
A(x) : this(0); /*@compile-error=unspecified*/
}
class ConstructorRedirect2NegativeTest {
static testMain() {
new A(10);
}
A(x)
: this(0) //# 01: compile-time error
;
}
main() {
ConstructorRedirect2NegativeTest.testMain();
new A(10);
}

View file

@ -0,0 +1,16 @@
// 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.
class A {
var x;
A(x) : this.named(x, 0);
A.named(x, int y)
// Redirecting constructors must not be cyclic.
: this(x + y) //# 01: compile-time error
;
}
main() {
new A(10);
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -2,8 +2,6 @@
// 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 duplicate_export_negative_test;
import 'duplicate_import_libd.dart';
import 'duplicate_import_libd.dart'; //# 01: compile-time error
void main() {}

View file

@ -1,17 +1,15 @@
// 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.
// Check fail because of cycles in super class relationship.
library duplicateInterfaceNegativeTest;
import "duplicate_interface_lib.dart" as alib;
import "duplicate_interface_lib.dart" show InterfA;
// Expect error since InterfA and alib.InterfA refer to the same interface.
class Foo implements InterfA, alib.InterfA { } //# compile-time error
class Foo implements InterfA
, alib.InterfA //# 01: compile-time error
{}
main() {
Expect.isTrue(new Foo() is InterfA);
Expect.isTrue(new Foo() is alib.InterfA);
new Foo();
}

View file

@ -17,7 +17,7 @@ const_cast2_test/01: CompileTimeError
const_cast2_test/none: CompileTimeError
const_for_in_variable_test/01: MissingCompileTimeError # Issue 25161
constructor_call_wrong_argument_count_negative_test: Fail # Issue 11585
constructor_type_parameter_test/00: MissingCompileTimeError
constructor_type_parameter_test/00: MissingCompileTimeError # Issue 33110
constructor_with_type_parameters_test/03: MissingCompileTimeError
deep_nesting1_negative_test: CompileTimeError # Issue 25558
deep_nesting2_negative_test: CompileTimeError # Issue 25558
@ -1341,6 +1341,7 @@ const_types_test/40: MissingCompileTimeError
constructor13_test/01: MissingCompileTimeError
constructor13_test/02: MissingCompileTimeError
constructor_call_as_function_test: StaticWarning
constructor_call_wrong_argument_count_test/01: MissingCompileTimeError
constructor_duplicate_final_test/03: MissingCompileTimeError
constructor_with_type_parameters_test/09: MissingCompileTimeError
constructor_with_type_parameters_test/15: MissingCompileTimeError

View file

@ -269,10 +269,8 @@ constructor_duplicate_final_test/01: MissingCompileTimeError
constructor_duplicate_final_test/02: MissingCompileTimeError
constructor_named_arguments_test/01: MissingCompileTimeError
constructor_named_arguments_test/none: RuntimeError
constructor_redirect1_negative_test/01: Crash # Stack Overflow
constructor_redirect1_negative_test/none: MissingCompileTimeError
constructor_redirect2_negative_test: Crash # Stack Overflow
constructor_redirect2_test/01: MissingCompileTimeError
constructor_redirect_cycle_test/01: MissingCompileTimeError
constructor_redirect_indirect_cycle_test/01: Crash # Stack Overflow
constructor_redirect_test/01: Crash # Assertion failure: Cannot find value Instance of 'ThisLocal' in (local(A.named2#x), local(A.named2#y), local(A.named2#z)) for j:constructor(A.named2).
covariance_type_parameter_test/02: Crash # NoSuchMethodError: The method 'hasSubclass' was called on null.
covariant_override/runtime_check_test: RuntimeError
@ -298,7 +296,6 @@ deferred_load_library_wrong_args_test/01: MissingRuntimeError
deferred_not_loaded_check_test: RuntimeError # Test out of date. Issue 31933
deferred_redirecting_factory_test: RuntimeError
double_int_to_string_test: RuntimeError, OK # non JS number semantics
duplicate_export_negative_test: Fail
duplicate_implements_test/01: MissingCompileTimeError
duplicate_implements_test/02: MissingCompileTimeError
duplicate_implements_test/03: MissingCompileTimeError
@ -569,8 +566,8 @@ const_types_test/39: MissingCompileTimeError
constants_test/05: MissingCompileTimeError
constructor12_test: RuntimeError
constructor_named_arguments_test/none: RuntimeError
constructor_redirect1_negative_test/01: Crash # Stack Overflow
constructor_redirect2_negative_test: Crash # Stack Overflow
constructor_redirect_cycle_test/01: Crash # Stack Overflow
constructor_redirect_indirect_cycle_test/01: Crash # Stack Overflow
constructor_redirect_test/01: Crash # Assertion failure: Cannot find value Instance of 'ThisLocal' in (local(A.named2#x), local(A.named2#y), local(A.named2#z)) for j:constructor(A.named2).
covariance_type_parameter_test/02: RuntimeError
covariant_override/tear_off_type_test: RuntimeError
@ -589,7 +586,6 @@ deferred_load_library_wrong_args_test/01: CompileTimeError
deferred_not_loaded_check_test: RuntimeError # Test out of date. Issue 31933
deferred_redirecting_factory_test: RuntimeError
double_int_to_string_test: RuntimeError, OK # non JS number semantics
duplicate_export_negative_test: Fail
duplicate_implements_test/01: MissingCompileTimeError
duplicate_implements_test/02: MissingCompileTimeError
dynamic_prefix_core_test/none: CompileTimeError
@ -854,6 +850,9 @@ call_method_must_not_be_getter_test/03: RuntimeError # Issue 32155
checked_setter2_test: RuntimeError # Issue 31128
checked_setter_test: RuntimeError # Issue 31128
const_dynamic_type_literal_test/03: Pass # but it shouldn't until we fix issue 17207
constructor_redirect_cycle_test/01: Crash # Stack Overflow
constructor_redirect_indirect_cycle_test/01: Crash # Stack Overflow
duplicate_interface_implements_test/01: MissingCompileTimeError
function_propagation_test: RuntimeError
generic_test/01: MissingCompileTimeError # front end does not validate `extends`
instantiate_tearoff_of_call_test: RuntimeError
@ -942,8 +941,8 @@ const_types_test/39: MissingCompileTimeError
constants_test/05: MissingCompileTimeError
constructor12_test: RuntimeError
constructor_named_arguments_test/none: RuntimeError
constructor_redirect1_negative_test/01: Crash # Stack Overflow
constructor_redirect2_negative_test: Crash # Issue 30856
constructor_redirect_cycle_test/01: Crash # Issue 30856
constructor_redirect_indirect_cycle_test/01: Crash # Stack Overflow
constructor_redirect_test/01: Crash # Assertion failure: Cannot find value Instance of 'ThisLocal' in (local(A.named2#x), local(A.named2#y), local(A.named2#z)) for j:constructor(A.named2).
covariance_type_parameter_test/02: RuntimeError
covariant_override/tear_off_type_test: RuntimeError
@ -969,7 +968,6 @@ deferred_load_library_wrong_args_test/01: CompileTimeError
deferred_not_loaded_check_test: RuntimeError # Test out of date. Issue 31933
deferred_redirecting_factory_test: RuntimeError
double_int_to_string_test: RuntimeError, OK # non JS number semantics
duplicate_export_negative_test: Fail
duplicate_implements_test/01: MissingCompileTimeError
duplicate_implements_test/02: MissingCompileTimeError
dynamic_prefix_core_test/none: CompileTimeError
@ -1457,8 +1455,8 @@ const_types_test/39: MissingCompileTimeError
constants_test/05: MissingCompileTimeError
constructor12_test: RuntimeError
constructor_named_arguments_test/none: RuntimeError
constructor_redirect1_negative_test/01: Crash # Stack Overflow
constructor_redirect2_negative_test: Crash # Issue 30856
constructor_redirect_cycle_test/01: Crash # Issue 30856
constructor_redirect_indirect_cycle_test/01: Crash # Stack Overflow
constructor_redirect_test/01: Crash # Assertion failure: Cannot find value Instance of 'ThisLocal' in (local(A.named2#x), local(A.named2#y), local(A.named2#z)) for j:constructor(A.named2).
covariance_type_parameter_test/02: RuntimeError
covariant_override/tear_off_type_test: RuntimeError
@ -1480,7 +1478,6 @@ deferred_load_library_wrong_args_test/01: CompileTimeError
deferred_not_loaded_check_test: RuntimeError # Test out of date. Issue 31933
deferred_redirecting_factory_test: RuntimeError
double_int_to_string_test: RuntimeError, OK # non JS number semantics
duplicate_export_negative_test: Fail
duplicate_implements_test/01: MissingCompileTimeError
duplicate_implements_test/02: MissingCompileTimeError
dynamic_prefix_core_test/none: CompileTimeError

View file

@ -340,8 +340,6 @@ const_syntax_test/05: MissingCompileTimeError
const_types_test/34: MissingCompileTimeError
const_types_test/39: MissingCompileTimeError
constants_test/05: MissingCompileTimeError
constructor_redirect1_negative_test/01: MissingCompileTimeError
constructor_redirect2_negative_test: MissingCompileTimeError
constructor_redirect_test/01: MissingCompileTimeError
covariant_subtyping_test: RuntimeError
cyclic_constructor_test/01: MissingCompileTimeError
@ -359,9 +357,9 @@ deferred_inheritance_constraints_test/mixin: MissingCompileTimeError
deferred_inheritance_constraints_test/redirecting_constructor: MissingCompileTimeError
deferred_load_library_wrong_args_test/01: CompileTimeError
double_identical_test: RuntimeError # Negative and positive zero are distinct, but not in ddk
duplicate_export_negative_test: Fail
duplicate_implements_test/01: MissingCompileTimeError
duplicate_implements_test/02: MissingCompileTimeError
duplicate_interface_implements_test/01: MissingCompileTimeError
dynamic_prefix_core_test/none: CompileTimeError
emit_const_fields_test: CompileTimeError # Issue 31533
export_ambiguous_main_test: MissingCompileTimeError

View file

@ -200,6 +200,7 @@ assertion_initializer_const_error2_test/cc08: MissingCompileTimeError
assertion_initializer_const_error2_test/cc09: MissingCompileTimeError
assertion_initializer_const_error2_test/cc10: MissingCompileTimeError
const_cast1_test/02: MissingCompileTimeError
duplicate_interface_implements_test/01: MissingCompileTimeError
generic_test/01: MissingCompileTimeError
implicit_creation/implicit_const_not_default_values_test/e1: MissingCompileTimeError
implicit_creation/implicit_const_not_default_values_test/e10: MissingCompileTimeError
@ -245,8 +246,8 @@ const_map3_test/00: MissingCompileTimeError # KernelVM bug: Constant evaluation.
const_switch2_test/01: MissingCompileTimeError # KernelVM bug: Constant evaluation.
const_types_test/34: MissingCompileTimeError # Issue 32988
const_types_test/39: MissingCompileTimeError # Issue 32988
constructor_redirect1_negative_test/01: MissingCompileTimeError # Issue 30856
constructor_redirect2_negative_test: MissingCompileTimeError # Issue 30856
constructor_redirect_cycle_test/01: MissingCompileTimeError # Issue 30856
constructor_redirect_indirect_cycle_test/01: MissingCompileTimeError # Issue 30856
constructor_redirect_test/01: MissingCompileTimeError # Fasta bug: Initializer refers to this.
cyclic_constructor_test/01: MissingCompileTimeError # Issue 30856 (cyclic constructor redirection)
cyclic_type_variable_test/01: MissingCompileTimeError # Issue 32989 (missing cycle check in bounds)
@ -259,7 +260,7 @@ deferred_inheritance_constraints_test/extends: MissingCompileTimeError # Fasta/K
deferred_inheritance_constraints_test/implements: MissingCompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273.
deferred_inheritance_constraints_test/mixin: MissingCompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273.
deferred_inheritance_constraints_test/redirecting_constructor: MissingCompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273.
duplicate_export_negative_test: Fail # Issue 12916
duplicate_export_collision_test/01: MissingCompileTimeError # Issue 12916
f_bounded_quantification_test/01: MissingCompileTimeError # Issue 33018
f_bounded_quantification_test/02: MissingCompileTimeError # Issue 33018
factory4_test/00: MissingCompileTimeError # Issue 32988
@ -1062,8 +1063,6 @@ cyclic_type_test/02: Fail, OK # Non-contractive types are not supported in the v
cyclic_type_test/04: Fail, OK
cyclic_typedef_test/10: Crash # Issue 32416.
cyclic_typedef_test/11: Crash # Issue 32416.
deep_nesting1_negative_test: Skip # Issue 31158
deep_nesting2_negative_test: Skip # Issue 31158
deferred_call_empty_before_load_test: RuntimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273.
deferred_load_constants_test/none: RuntimeError # KernelVM bug: Deferred loading kernel issue 30273.
deferred_load_library_wrong_args_test/01: Pass # Passes by mistake. KernelVM bug: Deferred loading kernel issue 30273.
@ -1673,11 +1672,10 @@ const_types_test/40: MissingCompileTimeError
constants_test/05: MissingCompileTimeError
constructor13_test/01: MissingCompileTimeError
constructor13_test/02: MissingCompileTimeError
constructor_call_wrong_argument_count_negative_test: Fail
constructor_call_wrong_argument_count_test/01: MissingCompileTimeError
constructor_duplicate_final_test/01: MissingCompileTimeError
constructor_duplicate_final_test/02: MissingCompileTimeError
constructor_named_arguments_test/01: MissingCompileTimeError
constructor_redirect1_negative_test/none: MissingCompileTimeError
create_unresolved_type_test/01: MissingCompileTimeError
cyclic_typedef_test/13: MissingCompileTimeError
deferred_constraints_type_annotation_test/as_operation: MissingCompileTimeError
@ -1697,7 +1695,6 @@ duplicate_implements_test/01: MissingCompileTimeError
duplicate_implements_test/02: MissingCompileTimeError
duplicate_implements_test/03: MissingCompileTimeError
duplicate_implements_test/04: MissingCompileTimeError
duplicate_interface_negative_test: Fail
dynamic_field_test/01: MissingCompileTimeError
dynamic_field_test/02: MissingCompileTimeError
dynamic_prefix_core_test/01: MissingCompileTimeError

View file

@ -258,8 +258,6 @@ cyclic_type_variable_test/02: MissingCompileTimeError
cyclic_type_variable_test/03: MissingCompileTimeError
cyclic_type_variable_test/04: MissingCompileTimeError
cyclic_typedef_test/13: MissingCompileTimeError
deep_nesting1_negative_test: Skip # Issue 31158
deep_nesting2_negative_test: Skip # Issue 31158
default_factory2_test/01: MissingCompileTimeError
default_factory_test/01: MissingCompileTimeError
deferred_constraints_constants_test: SkipByDesign
@ -284,7 +282,6 @@ deferred_load_constants_test/05: Fail
deferred_not_loaded_check_test: RuntimeError
deferred_redirecting_factory_test: Fail, Crash # Issue 23408
deopt_inlined_function_lazy_test: Skip # Incompatible flag: --deoptimize-alot
duplicate_export_negative_test: Fail # Issue 6134
dynamic_field_test/01: MissingCompileTimeError
dynamic_field_test/02: MissingCompileTimeError
dynamic_prefix_core_test/01: MissingCompileTimeError

View file

@ -10,16 +10,7 @@ conditional_import_test: Fail # Uses conditional import.
config_import_corelib_test: Fail # Uses conditional import.
config_import_test: Fail # Uses conditional import.
const_native_factory_test: Skip # Uses `native`.
constructor_call_wrong_argument_count_negative_test: Skip # Negative, not syntax.
constructor_redirect1_negative_test/01: Skip # Negative, not syntax.
constructor_redirect1_negative_test/none: Skip # Negative, not syntax.
constructor_redirect2_negative_test: Skip # Negative, not syntax.
constructor_setter_negative_test: Skip # Negative, not syntax.
deep_nesting1_negative_test: Skip # Stack overflow.
deep_nesting2_negative_test: Skip # Stack overflow.
double_invalid_test: Skip # Contains illegaly formatted double.
duplicate_export_negative_test: Skip # Negative, not syntax.
duplicate_interface_negative_test: Skip # Negative, not syntax.
external_test/21: Fail # Test expects `runtime error`, it is a syntax error.
getter_declaration_negative_test: Fail # Negative, uses getter with parameter.
inst_field_initializer1_negative_test: Skip # Negative, not syntax.

View file

@ -21,7 +21,7 @@ closure_cycles_test: Pass, Slow
large_class_declaration_test: SkipSlow # Uses too much memory.
[ $arch == ia32 && $mode == release && $runtime == vm ]
deep_nesting1_negative_test: Crash, Pass # Issue 31496
deep_nesting_expression_test/01: Crash, Pass # Issue 31496
[ !$strong && ($runtime == dart_precompiled || $runtime == vm) ]
*: SkipByDesign # tests/language has the non-strong mode versions of these tests.

View file

@ -38,6 +38,7 @@ const useSdk = "--use-sdk";
const releaseMode = "--mode=release";
const productMode = "--mode=product";
const strong = "--strong";
const previewDart2 = "--preview-dart-2";
/// Maps configuration names to a corresponding set of test.dart command line
/// arguments.
@ -75,6 +76,7 @@ final allConfigs = {
],
"dart2js-jsshell": [dart2js, jsshell, fastStartup, useSdk, dart2jsBatch],
// TODO(rnystrom): Is it worth running dart2js on Firefox too?
"dart2js-2": [dart2js, chrome, dart2jsBatch, previewDart2],
"dartdevc": [dartdevc, chrome, useSdk, strong],
"dartdevc-kernel": [dartdevk, chrome, checked, useSdk, strong],
"dartdevc-kernel-noruntime": [dartdevk, noRuntime, checked, useSdk, strong],