Skip to content

Commit 1f5e47e

Browse files
committed
Add more isNaN tests
1 parent f9a8f7c commit 1f5e47e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/test/run-pass/float-nan.rs

+8
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,12 @@ fn main() {
7171
assert(float::isNaN(0. / 0.));
7272
assert(float::isNaN(-inf + inf));
7373
assert(float::isNaN(inf - inf));
74+
75+
assert(!float::isNaN(-1.));
76+
assert(!float::isNaN(0.));
77+
assert(!float::isNaN(0.1));
78+
assert(!float::isNaN(1.));
79+
assert(!float::isNaN(inf));
80+
assert(!float::isNaN(-inf));
81+
assert(!float::isNaN(1./-inf));
7482
}

0 commit comments

Comments
 (0)