diff options
| author | Tim Chevalier <[email protected]> | 2011-03-21 16:43:05 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-03-22 09:42:31 -0700 |
| commit | 8556b2c1ad9328ceebb32e934179bcb8a3c0794f (patch) | |
| tree | d5d225a9c921a73f95d7edf60dec07f844d5690d | |
| parent | Add some nesting to the else-if test case (diff) | |
| download | rust-8556b2c1ad9328ceebb32e934179bcb8a3c0794f.tar.xz rust-8556b2c1ad9328ceebb32e934179bcb8a3c0794f.zip | |
Added test case for floats
| -rw-r--r-- | src/Makefile | 5 | ||||
| -rw-r--r-- | src/test/run-pass/float.rs | 9 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile index 229b4e49..bd084e02 100644 --- a/src/Makefile +++ b/src/Makefile @@ -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 \ diff --git a/src/test/run-pass/float.rs b/src/test/run-pass/float.rs new file mode 100644 index 00000000..dad2f6d8 --- /dev/null +++ b/src/test/run-pass/float.rs @@ -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"); + } +}
\ No newline at end of file |