blob: 0c3f455036c05cf7763b990378b64348b21ca31a [file] [log] [blame]
// 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.
// @dart = 2.9
/// @assertion double operator /(num other)
/// This operator implements the arithmetic division operation.
/// @description Checks that division by zero yields correct results (infinities
/// and NaN).
/// @author msyabro
import "../../../Utils/expect.dart";
main() {
Expect.equals(double.infinity, 1 / 0);
Expect.equals(double.negativeInfinity, -2 / 0);
Expect.isTrue((0 / 0).isNaN);
}