Added test case for floats
This commit is contained in:
parent
1689d99965
commit
8556b2c1ad
@ -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 \
|
||||
|
9
src/test/run-pass/float.rs
Normal file
9
src/test/run-pass/float.rs
Normal 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");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user