Files
sdk/tests/language/operator/truncdiv_zero_test.dart
T
Parker Lougheed c73677e606 [tests] Minor spelling and grammar fixes
Change-Id: I18c309b9037cf94a883443ac9067f911f829516c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388945
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2024-10-09 08:38:48 +00:00

21 lines
764 B
Dart

// Copyright (c) 2019, 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.
// Dart test optimization of modulo operator on Smi.
// VMOptions=--optimization-counter-threshold=10 --no-use-osr
import "package:expect/expect.dart";
import 'package:expect/variations.dart' as v;
import "truncdiv_test.dart" as truncdiv_test show foo, foo2;
main() {
if (!v.jsNumbers) {
Expect.throws<UnsupportedError>(() => truncdiv_test.foo(12, 0));
} else {
// Web numbers consider infinities to be large-magnitude 'int' values.
truncdiv_test.foo(12, 0);
}
Expect.throws<UnsupportedError>(() => truncdiv_test.foo2(0));
}