From 9e1e42d7504f6a40a887cc824a312a6ead58c0f2 Mon Sep 17 00:00:00 2001
From: Brian Anderson <banderson@mozilla.com>
Date: Sun, 8 Apr 2012 14:16:55 -0700
Subject: [PATCH] core: Add tests for the string repr of infinity

---
 src/libcore/float.rs | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/libcore/float.rs b/src/libcore/float.rs
index fa7a493d8a1..04efad11a5f 100644
--- a/src/libcore/float.rs
+++ b/src/libcore/float.rs
@@ -358,6 +358,12 @@ fn test_nonnegative() {
   assert(!is_nonnegative(NaN));
 }
 
+#[test]
+fn test_to_str_inf() {
+    assert to_str(infinity, 10u) == "inf";
+    assert to_str(-infinity, 10u) == "-inf";
+}
+
 //
 // Local Variables:
 // mode: rust