core: Add tests for the string repr of infinity

This commit is contained in:
Brian Anderson 2012-04-08 14:16:55 -07:00
parent 56f09791fe
commit 9e1e42d750

View File

@ -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