Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(389)

Unified Diff: tests/language/nan_identical_test.dart

Issue 1160453003: Fix 23563: double unary- operator unstable for NANs (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: g Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« runtime/lib/double.cc ('K') | « tests/corelib/nan_infinity_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/nan_identical_test.dart
diff --git a/tests/language/nan_identical_test.dart b/tests/language/nan_identical_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..343a5b9cc7aa9826351b5d0bbd181facab0b85c2
--- /dev/null
+++ b/tests/language/nan_identical_test.dart
@@ -0,0 +1,17 @@
+// Copyright (c) 2015, 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.
+// Test a new statement by itself.
+// VMOptions=--optimization-counter-threshold=4 --no-use-osr
+
+import "package:expect/expect.dart";
+
+main() {
+ for (int i = 0; i < 100; i++) {
+ Expect.isFalse(checkIdentical(double.NAN, -double.NAN));
+ Expect.isTrue(checkIdentical(double.NAN, double.NAN));
+ Expect.isTrue(checkIdentical(-double.NAN, -double.NAN));
koda 2015/06/02 21:20:57 You should also test the return value for other Na
srdjan 2015/06/02 22:32:10 Done.
+ }
+}
+
+checkIdentical(a, b) => identical(a, b);
« runtime/lib/double.cc ('K') | « tests/corelib/nan_infinity_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698