Skip to content

Commit 8556b2c

Browse files
catamorphismgraydon
authored andcommitted
Added test case for floats
1 parent 1689d99 commit 8556b2c

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,10 @@ self: $(CFG_RUSTC)
417417
# Testing
418418
######################################################################
419419

420+
# Float doesn't work in boot
421+
422+
FLOAT_XFAILS := test/run-pass/float.rs
423+
420424
# Temporarily xfail tests broken by the nominal-tags change.
421425

422426
NOMINAL_TAG_XFAILS := test/run-pass/mlist.rs
@@ -442,6 +446,7 @@ TASK_XFAILS := test/run-pass/task-comm-8.rs \
442446
TEST_XFAILS_BOOT := $(TASK_XFAILS) \
443447
$(NOMINAL_TAG_XFAILS) \
444448
$(CONST_TAG_XFAILS) \
449+
$(FLOAT_XFAILS) \
445450
test/run-pass/arith-unsigned.rs \
446451
test/run-pass/box-compare.rs \
447452
test/run-pass/child-outlives-parent.rs \

src/test/run-pass/float.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
fn main() {
2+
auto pi = 3.1415927;
3+
4+
log(-pi * (pi + (2.0/pi)) - (pi * 5.0));
5+
if(pi == 5.0 || pi < 10.0 || pi <= 2.0 ||
6+
pi != 22.0/7.0 || pi >= 10.0 || pi > 1.0) {
7+
log("yes");
8+
}
9+
}

0 commit comments

Comments
 (0)