diff --git a/tests/corelib_2/corelib_2.status b/tests/corelib_2/corelib_2.status index cc9dfb92af5..49be466b7ec 100644 --- a/tests/corelib_2/corelib_2.status +++ b/tests/corelib_2/corelib_2.status @@ -59,6 +59,8 @@ from_environment_const_type_undefined_test/12: MissingCompileTimeError from_environment_const_type_undefined_test/13: MissingCompileTimeError from_environment_const_type_undefined_test/14: MissingCompileTimeError from_environment_const_type_undefined_test/16: MissingCompileTimeError +int_modulo_arith_test/modPow: RuntimeError +int_modulo_arith_test/none: RuntimeError int_parse_radix_bad_handler_test: MissingCompileTimeError map_test: Crash # crash in front_end. string_from_environment3_test/01: MissingCompileTimeError @@ -435,8 +437,6 @@ bigint_test: Pass, Timeout # Please triage. apply3_test: CompileTimeError # Issue 31402 (Invocation arguments) bool_from_environment2_test/03: MissingCompileTimeError compare_to2_test: RuntimeError -int_modulo_arith_test/modPow: CompileTimeError # Issue 31402 (Assert statement) -int_modulo_arith_test/none: CompileTimeError # Issue 31402 (Assert statement) iterable_empty_test: RuntimeError iterable_fold_test/02: RuntimeError iterable_reduce_test/01: CompileTimeError # Issue 31533 @@ -468,8 +468,6 @@ unicode_test: RuntimeError [ $compiler == dartkp && $runtime == dart_precompiled && $strong ] bool_from_environment2_test/03: MissingCompileTimeError compare_to2_test: RuntimeError -int_modulo_arith_test/modPow: CompileTimeError # Issue 31402 (Assert statement) -int_modulo_arith_test/none: CompileTimeError # Issue 31402 (Assert statement) iterable_empty_test: RuntimeError iterable_fold_test/02: RuntimeError iterable_reduce_test/01: CompileTimeError # Issue 31533 diff --git a/tests/corelib_2/int_modulo_arith_test.dart b/tests/corelib_2/int_modulo_arith_test.dart index 6923cb7189d..4b347cc1e34 100644 --- a/tests/corelib_2/int_modulo_arith_test.dart +++ b/tests/corelib_2/int_modulo_arith_test.dart @@ -25,7 +25,7 @@ testModPow() { } return slowModPow(x, e, m) == expectedResult; - }); + }()); var result = x.modPow(e, m); Expect.equals(expectedResult, result, "$x.modPow($e, $m)"); } diff --git a/tests/language_2/assert_message_test.dart b/tests/language_2/assert_message_test.dart index d2a8b2ea457..5b7debbe773 100644 --- a/tests/language_2/assert_message_test.dart +++ b/tests/language_2/assert_message_test.dart @@ -17,7 +17,6 @@ main() { // Basics. assert(true, ""); - assert(() => true, ""); int x = null; // Successful asserts won't execute message. diff --git a/tests/language_2/assertion_test.dart b/tests/language_2/assertion_test.dart index 3470f0987bf..bad4bbd8994 100644 --- a/tests/language_2/assertion_test.dart +++ b/tests/language_2/assertion_test.dart @@ -31,16 +31,6 @@ unknown(dynamic a) { return a ? true : false; } -testClosure(bool f()) { - int i = 0; - try { - assert(f); - } on AssertionError { - i = 1; - } - return i; -} - testBoolean(bool value) { int i = 0; try { @@ -84,13 +74,10 @@ main() { Expect.equals(1, testBoolean(null)); Expect.equals(1, testDynamic(null)); Expect.equals(1, testDynamic(42)); - Expect.equals(1, testClosure(() => true)); Expect.equals(1, testDynamic(() => true)); - Expect.equals(1, testClosure(() => false)); Expect.equals(1, testDynamic(() => false)); Expect.equals(1, testDynamic(() => 42)); Expect.equals(1, testDynamic(() => null)); - Expect.equals(1, testClosure(() => null)); Expect.equals(1234, testMessage(false, 1234).message); Expect.equals('hi', testMessage(false, 'hi').message); diff --git a/tests/language_2/language_2_dart2js.status b/tests/language_2/language_2_dart2js.status index 3268b3dbcbf..a854a86f725 100644 --- a/tests/language_2/language_2_dart2js.status +++ b/tests/language_2/language_2_dart2js.status @@ -786,6 +786,9 @@ regress_30339_test: RuntimeError # Issue 26429 field_override_optimization_test: RuntimeError field_type_check2_test/01: MissingRuntimeError +[ $compiler == dart2js && $runtime == d8 && $dart2js_with_kernel ] +assertion_test: RuntimeError + [ $compiler == dart2js && $runtime == drt && $checked && !$dart2js_with_kernel ] regress_30339_test: RuntimeError # Issue 30393 diff --git a/tests/language_2/language_2_dartdevc.status b/tests/language_2/language_2_dartdevc.status index ca18e3bfba6..d09c5c9c501 100644 --- a/tests/language_2/language_2_dartdevc.status +++ b/tests/language_2/language_2_dartdevc.status @@ -132,7 +132,6 @@ additional_interface_adds_optional_args_concrete_subclass_test: MissingCompileTi additional_interface_adds_optional_args_concrete_test: MissingCompileTimeError additional_interface_adds_optional_args_supercall_test: MissingCompileTimeError arithmetic_test: RuntimeError # Issue 31763 -assert_message_test: CompileTimeError assertion_initializer_const_error2_test/cc01: MissingCompileTimeError assertion_initializer_const_error2_test/cc02: MissingCompileTimeError assertion_initializer_const_error2_test/cc03: MissingCompileTimeError @@ -144,7 +143,6 @@ assertion_initializer_const_error2_test/cc09: MissingCompileTimeError assertion_initializer_const_error2_test/cc10: MissingCompileTimeError assertion_initializer_const_error2_test/cc11: MissingCompileTimeError assertion_initializer_test: CompileTimeError -assertion_test: CompileTimeError async_await_syntax_test/c10a: MissingCompileTimeError async_await_syntax_test/d08b: MissingCompileTimeError async_await_syntax_test/d10a: MissingCompileTimeError @@ -685,6 +683,7 @@ void_type_callbacks_test/none: CompileTimeError wrong_number_type_arguments_test/01: MissingCompileTimeError [ $compiler == dartdevc && $runtime != none ] +assertion_test: RuntimeError # Issue 30326; Expect.equals(expected: <1>, actual: <0>) fails. async_star_test/01: RuntimeError async_star_test/03: RuntimeError async_star_test/04: RuntimeError @@ -829,7 +828,6 @@ unhandled_exception_negative_test: Fail # dartdevc and dartdevk, then expectations for dartdevc, and then expectations # for dartdevk. [ $runtime != none && ($compiler == dartdevc || $compiler == dartdevk) ] -assertion_test: RuntimeError # Issue 30326; Expect.equals(expected: <1>, actual: <0>) fails. async_star_cancel_while_paused_test: RuntimeError # Issue 29920; Uncaught Expect.listEquals(list length, expected: <4>, actual: <3>) fails: Next element <*3> async_star_pause_test: RuntimeError # Uncaught Expect.listEquals(at index 2, expected: <0+>, actual: <0!>) fails async_star_test/02: RuntimeError diff --git a/tests/language_2/language_2_kernel.status b/tests/language_2/language_2_kernel.status index ab95ff9fbdc..b5467c45425 100644 --- a/tests/language_2/language_2_kernel.status +++ b/tests/language_2/language_2_kernel.status @@ -165,9 +165,7 @@ additional_interface_adds_optional_args_concrete_subclass_test: MissingCompileTi additional_interface_adds_optional_args_concrete_test: MissingCompileTimeError additional_interface_adds_optional_args_supercall_test: MissingCompileTimeError arithmetic2_test: RuntimeError # Throws CastError instead of TypeError -assert_message_test: CompileTimeError # Issue 31402 (Assert statement) assertion_initializer_test: CompileTimeError # Issue 31402 (Assert statement) -assertion_test: CompileTimeError # Issue 31402 (Assert statement) assign_to_type_test/01: MissingCompileTimeError assign_to_type_test/02: MissingCompileTimeError assign_to_type_test/03: MissingCompileTimeError @@ -1124,7 +1122,6 @@ unresolved_default_constructor_test/01: MissingCompileTimeError unresolved_in_factory_test: MissingCompileTimeError unresolved_top_level_method_test: MissingCompileTimeError unresolved_top_level_var_test: MissingCompileTimeError -vm/canonicalization_preserves_deopt_test: CompileTimeError # Issue 31402 (Assert statement) vm/closure_memory_retention_test: Skip # KernelVM bug: Hits OOM vm/debug_break_enabled_vm_test/01: CompileTimeError # KernelVM bug: Bad test using extended break syntax. vm/debug_break_enabled_vm_test/none: CompileTimeError # KernelVM bug: Bad test using extended break syntax. @@ -1366,12 +1363,9 @@ abstract_syntax_test/00: MissingCompileTimeError additional_interface_adds_optional_args_concrete_subclass_test: MissingCompileTimeError additional_interface_adds_optional_args_concrete_test: MissingCompileTimeError additional_interface_adds_optional_args_supercall_test: MissingCompileTimeError -assert_message_test: CompileTimeError # Issue 31402 (Assert statement) assert_with_type_test_or_cast_test: Pass, Crash assertion_initializer_const_error_test/01: Pass assertion_initializer_test: CompileTimeError # Issue 31402 (Assert statement) -assertion_test: CompileTimeError # Issue 31402 (Assert statement) -assertion_test: RuntimeError # Issue 30326 assign_to_type_test/01: MissingCompileTimeError assign_to_type_test/02: MissingCompileTimeError assign_to_type_test/03: MissingCompileTimeError @@ -2418,7 +2412,6 @@ unresolved_default_constructor_test/01: MissingCompileTimeError unresolved_in_factory_test: MissingCompileTimeError unresolved_top_level_method_test: MissingCompileTimeError unresolved_top_level_var_test: MissingCompileTimeError -vm/canonicalization_preserves_deopt_test: CompileTimeError # Issue 31402 (Assert statement) vm/causal_async_exception_stack2_test: SkipByDesign vm/causal_async_exception_stack_test: SkipByDesign vm/closure_memory_retention_test: Skip # KernelVM bug: Hits OOM diff --git a/tests/language_2/vm/canonicalization_preserves_deopt_test.dart b/tests/language_2/vm/canonicalization_preserves_deopt_test.dart index da282a5d6d0..37d1587e934 100644 --- a/tests/language_2/vm/canonicalization_preserves_deopt_test.dart +++ b/tests/language_2/vm/canonicalization_preserves_deopt_test.dart @@ -28,13 +28,13 @@ main() { assert(() { Expect.isTrue(bar(-1 << 63)); return true; - }); + }()); Expect.isTrue(baz(-1 << 63)); } Expect.isFalse(foo(new X())); assert(() { Expect.isFalse(bar(new X())); return true; - }); + }()); Expect.isFalse(baz(new X())); } diff --git a/tests/standalone_2/assert_test.dart b/tests/standalone_2/assert_test.dart deleted file mode 100644 index 17f9e314a5b..00000000000 --- a/tests/standalone_2/assert_test.dart +++ /dev/null @@ -1,41 +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. -// VMOptions=--enable_asserts - -// Dart test program testing assert statements. - -import "package:expect/expect.dart"; - -class AssertTest { - static test() { - try { - assert(false); - Expect.fail("Assertion 'false' didn't fail."); - } on AssertionError catch (error) { - Expect.isTrue(error.toString().contains("'false'")); - Expect.isTrue( - error.stackTrace.toString().contains("assert_test.dart:13:14")); - } - } - - static testClosure() { - try { - assert(() => false); - Expect.fail("Assertion '() => false' didn't fail."); - } on AssertionError catch (error) { - Expect.isTrue(error.toString().contains("'() => false'")); - Expect.isTrue( - error.stackTrace.toString().contains("assert_test.dart:24:14")); - } - } - - static testMain() { - test(); - testClosure(); - } -} - -main() { - AssertTest.testMain(); -} diff --git a/tests/standalone_2/standalone_2.status b/tests/standalone_2/standalone_2.status index 678a68810f9..2f97a1d873c 100644 --- a/tests/standalone_2/standalone_2.status +++ b/tests/standalone_2/standalone_2.status @@ -30,9 +30,6 @@ io/socket_info_ipv6_test: SkipByDesign io/socket_ipv6_test: SkipByDesign io/socket_source_address_test: SkipByDesign -[ $compiler == app_jit ] -assert_test: RuntimeError - [ $compiler == dart2analyzer ] deferred_transitive_import_error_test: Skip @@ -92,7 +89,6 @@ io/socket_connect_stream_data_close_cancel_test: Pass, Timeout # Issue 27453 io/socket_many_connections_test: Skip # This test fails with "Too many open files" on the Mac OS buildbot. This is expected as MacOS by default runs with a very low number of allowed open files ('ulimit -n' says something like 256). [ $strong && ($compiler == dartk || $compiler == dartkp) ] -assert_test: RuntimeError io/dependency_graph_test: CompileTimeError io/directory_test: RuntimeError io/file_error_test: RuntimeError @@ -114,7 +110,6 @@ io/web_socket_protocol_processor_test: RuntimeError io/zlib_test: RuntimeError [ !$strong && ($compiler == dartk || $compiler == dartkp) ] -assert_test: RuntimeError io/compile_all_test: Skip # Crashes io/http_client_connect_test: Skip # Flaky. io/http_content_length_test: Skip # Flaky. @@ -142,11 +137,10 @@ regress_29350_test: MissingCompileTimeError [ $arch == arm || $arch == arm64 || $runtime != vm || $mode == debug && $system == windows ] fragmentation_test: Skip -[ $compiler == dart2js || $compiler == dartdevc ] +[ $compiler == dart2js || $compiler == dartdevc || $compiler == dartdevk ] *: SkipByDesign [ $mode == product || $runtime == dart_precompiled ] -assert_test: SkipByDesign no_assert_test: SkipByDesign [ $runtime == dart_precompiled || $runtime == flutter || $runtime == vm ] diff --git a/tests/standalone_2/standalone_2_kernel.status b/tests/standalone_2/standalone_2_kernel.status index e85487206e5..ca96d89d58a 100644 --- a/tests/standalone_2/standalone_2_kernel.status +++ b/tests/standalone_2/standalone_2_kernel.status @@ -21,7 +21,6 @@ io/socket_port_test: Pass, Crash # ===== dartk + vm status lines ===== [ $compiler == dartk && $runtime == vm && $strong ] -assert_test: CompileTimeError # Issue 31402 (Assert statement) io/compile_all_test: Crash io/http_client_request_test: Pass, Timeout io/http_compression_test: RuntimeError