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

Unified Diff: tests/lib/math/double_pow_test.dart

Issue 2247553002: Fix a test to not expect NaNs to be bitwise identical. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « tests/lib/lib.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/math/double_pow_test.dart
diff --git a/tests/lib/math/double_pow_test.dart b/tests/lib/math/double_pow_test.dart
index 83a8ecea99790e814503af74d9b5ebad74bf029e..b6fc4b4c095fdc45f9ce05989015ebf57e4b207b 100644
--- a/tests/lib/math/double_pow_test.dart
+++ b/tests/lib/math/double_pow_test.dart
@@ -117,8 +117,8 @@ test() {
}
// if `x` is -Infinity or -0.0 and `y` is not an odd integer, then the
// result is the same as `pow(-x , y)`.
- Expect.identical(pow(Infinity, d), pow(-Infinity, d));
- Expect.identical(pow(0.0, d), pow(-0.0, d));
+ Expect.equals(pow(Infinity, d), pow(-Infinity, d));
+ Expect.equals(pow(0.0, d), pow(-0.0, d));
Lasse Reichstein Nielsen 2016/08/12 23:52:38 I'm not sure that's what we want. If the problem
Florian Schneider 2016/08/13 00:01:29 Never mind my first attempt: Can't use == on NaN i
}
for (var d in samples) {
@@ -136,7 +136,7 @@ test() {
Expect.identical(1.0, pow(d, Infinity));
}
// if `y` is -Infinity, the result is `1/pow(x, Infinity)`.
- Expect.identical(1/pow(d, Infinity), pow(d, -Infinity));
+ Expect.equals(1/pow(d, Infinity), pow(d, -Infinity));
Lasse Reichstein Nielsen 2016/08/12 23:52:38 Again, this should hold, and if it doesn't because
}
// Some non-exceptional values.
@@ -159,4 +159,4 @@ test() {
main() {
for (int i = 0; i < 10; i++) test();
-}
+}
« no previous file with comments | « tests/lib/lib.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698