Added test case for floats

This commit is contained in:
Tim Chevalier 2011-03-21 16:43:05 -07:00 committed by Graydon Hoare
parent 1689d99965
commit 8556b2c1ad
2 changed files with 14 additions and 0 deletions

View File

@ -417,6 +417,10 @@ self: $(CFG_RUSTC)
# Testing
######################################################################
# Float doesn't work in boot
FLOAT_XFAILS := test/run-pass/float.rs
# Temporarily xfail tests broken by the nominal-tags change.
NOMINAL_TAG_XFAILS := test/run-pass/mlist.rs
@ -442,6 +446,7 @@ TASK_XFAILS := test/run-pass/task-comm-8.rs \
TEST_XFAILS_BOOT := $(TASK_XFAILS) \
$(NOMINAL_TAG_XFAILS) \
$(CONST_TAG_XFAILS) \
$(FLOAT_XFAILS) \
test/run-pass/arith-unsigned.rs \
test/run-pass/box-compare.rs \
test/run-pass/child-outlives-parent.rs \

View File

@ -0,0 +1,9 @@
fn main() {
auto pi = 3.1415927;
log(-pi * (pi + (2.0/pi)) - (pi * 5.0));
if(pi == 5.0 || pi < 10.0 || pi <= 2.0 ||
pi != 22.0/7.0 || pi >= 10.0 || pi > 1.0) {
log("yes");
}
}