about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorMatt Brubeck <mbrubeck@limpet.net>2011-10-27 17:45:04 -0700
committerBrian Anderson <banderson@mozilla.com>2011-10-28 14:44:39 -0700
commit45d77779916a7af0b2b7656453e31eea9f4b3cfa (patch)
tree1bcad742782d3a0d9da41fcacae7c566d74d21f0 /src/test
parent000b2fe9a6b18cab1deee9579e8740d7c37a67b4 (diff)
downloadrust-45d77779916a7af0b2b7656453e31eea9f4b3cfa.tar.gz
rust-45d77779916a7af0b2b7656453e31eea9f4b3cfa.zip
Change behavior of float::nonpositive/nonnegative
Rather than being defined as !positive and !negative, these should act the
same as negative and positive (respectively).  The only effect of this change
should be that all four functions will now return false for NaN.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/stdtest/float.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/stdtest/float.rs b/src/test/stdtest/float.rs
index 302d6b1679e..d9de78b6009 100644
--- a/src/test/stdtest/float.rs
+++ b/src/test/stdtest/float.rs
@@ -47,7 +47,7 @@ fn test_nonpositive() {
   assert(float::nonpositive(-1.));
   assert(float::nonpositive(float::neg_infinity()));
   assert(float::nonpositive(1./float::neg_infinity()));
-  // TODO: assert(!float::nonpositive(float::NaN()));
+  assert(!float::nonpositive(float::NaN()));
 }
 
 #[test]
@@ -58,5 +58,5 @@ fn test_nonnegative() {
   assert(!float::nonnegative(-1.));
   assert(!float::nonnegative(float::neg_infinity()));
   assert(!float::nonnegative(1./float::neg_infinity()));
-  // TODO: assert(!float::nonnegative(float::NaN()));
+  assert(!float::nonnegative(float::NaN()));
 }