File tree Expand file tree Collapse file tree 3 files changed +21
-4
lines changed Expand file tree Collapse file tree 3 files changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ super_bound_closure_test/none: CompileTimeError
194
194
super_call4_test/01: MissingCompileTimeError
195
195
super_test: RuntimeError
196
196
tearoff_dynamic_test: RuntimeError
197
- truncdiv_test : RuntimeError # non JS number semantics - Issue 15246
197
+ truncdiv_zero_test : RuntimeError # non JS number semantics - Issue 15246
198
198
type_constants_test/none: RuntimeError # Issue 35052
199
199
type_error_test: RuntimeError
200
200
type_literal_canonicalization_test: RuntimeError
@@ -491,7 +491,7 @@ stacktrace_rethrow_nonerror_test: RuntimeError # Issue 12698
491
491
stacktrace_test: RuntimeError # Issue 12698
492
492
symbol_literal_test/01: MissingCompileTimeError
493
493
tearoff_dynamic_test: RuntimeError
494
- truncdiv_test : RuntimeError # non JS number semantics - Issue 15246
494
+ truncdiv_zero_test : RuntimeError # non JS number semantics - Issue 15246
495
495
type_check_const_function_typedef2_test: MissingCompileTimeError
496
496
type_literal_canonicalization_test: RuntimeError
497
497
type_parameter_test/06: Crash # Internal Error: Unexpected type variable in static context.
Original file line number Diff line number Diff line change @@ -16,8 +16,11 @@ main() {
16
16
Expect .equals (i ~ / i, foo2 (i));
17
17
}
18
18
}
19
- Expect .throws (() => foo (12 , 0 ), (e) => e is IntegerDivisionByZeroException );
20
- Expect .throws (() => foo2 (0 ), (e) => e is IntegerDivisionByZeroException );
19
+ // We don't specify the exact exception type here, that is covered in
20
+ // truncdiv_zero_test. The correct answer is IntegerDivisionByZeroException,
21
+ // but the web platform has only one num type and can't distinguish between
22
+ // int and double, so it throws UnsupportedError (the behaviour for double).
23
+ Expect .throws (() => foo2 (0 ));
21
24
}
22
25
23
26
foo (i, x) => i % x;
Original file line number Diff line number Diff line change
1
+ // Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
2
+ // for details. All rights reserved. Use of this source code is governed by a
3
+ // BSD-style license that can be found in the LICENSE file.
4
+ // Dart test optimization of modulo operator on Smi.
5
+ // VMOptions=--optimization-counter-threshold=10 --no-use-osr
6
+
7
+ import "package:expect/expect.dart" ;
8
+
9
+ import "truncdiv_test.dart" as truncdiv_test show foo, foo2;
10
+
11
+ main () {
12
+ Expect .throws <IntegerDivisionByZeroException >(() => truncdiv_test.foo (12 , 0 ));
13
+ Expect .throws <IntegerDivisionByZeroException >(() => truncdiv_test.foo2 (0 ));
14
+ }
You can’t perform that action at this time.
0 commit comments