mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 10:48:25 +00:00
7f9362fb42
TEST=ci Change-Id: Ie73a5e11da0fe085a209a6a8f684aaf1f77b696f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322800 Reviewed-by: Alexander Markov <alexmarkov@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
35 lines
1.3 KiB
Dart
35 lines
1.3 KiB
Dart
// Copyright (c) 2023, 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.
|
|
|
|
@pragma("vm:never-inline")
|
|
@pragma("dart2js:noInline")
|
|
double hiddenZero() => double.parse("0.0");
|
|
|
|
@pragma("vm:never-inline")
|
|
@pragma("dart2js:noInline")
|
|
double hiddenNaN() => double.parse("NaN");
|
|
|
|
void main() {
|
|
if (hiddenZero() == hiddenNaN()) throw "==";
|
|
if (hiddenZero() != hiddenNaN()) {} else throw "!=";
|
|
if (hiddenZero() < hiddenNaN()) throw "<";
|
|
if (hiddenZero() <= hiddenNaN()) throw "<=";
|
|
if (hiddenZero() > hiddenNaN()) throw ">";
|
|
if (hiddenZero() >= hiddenNaN()) throw ">=";
|
|
|
|
if (hiddenNaN() == hiddenNaN()) throw "==";
|
|
if (hiddenNaN() != hiddenNaN()) {} else throw "!=";
|
|
if (hiddenNaN() < hiddenNaN()) throw "<";
|
|
if (hiddenNaN() <= hiddenNaN()) throw "<=";
|
|
if (hiddenNaN() > hiddenNaN()) throw ">";
|
|
if (hiddenNaN() >= hiddenNaN()) throw ">=";
|
|
|
|
if (hiddenNaN() == hiddenZero()) throw "==";
|
|
if (hiddenNaN() != hiddenZero()) {} else throw "!=";
|
|
if (hiddenNaN() < hiddenZero()) throw "<";
|
|
if (hiddenNaN() <= hiddenZero()) throw "<=";
|
|
if (hiddenNaN() > hiddenZero()) throw ">";
|
|
if (hiddenNaN() >= hiddenZero()) throw ">=";
|
|
}
|