core: Add tests for the string repr of infinity
This commit is contained in:
parent
56f09791fe
commit
9e1e42d750
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user