pike.git
/
src
/
testsuite.in
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/testsuite.in:1:
START_MARKER
-
test_true([["$Id: testsuite.in,v 1.
894
2010/
04
/
16
00
:
16
:
16
mast
Exp $"]]);
+
test_true([["$Id: testsuite.in,v 1.
895
2010/
06
/
02
11
:
13
:
57
grubba
Exp $"]]);
// This triggered a bug only if run sufficiently early. test_compile_any([[#pike 7.2]]) test_compile_any([[#pike 7.4]]) test_compile_any([[#pike 7.0]]) test_compile_any([[#pike 0.6]]) cond([[all_constants()->_verify_internals]], [[ test_do(_verify_internals())
pike.git/src/testsuite.in:8378:
test_eq([[(float)"1.0"]],[[1.0]]) test_eq([[(float)"-1.0"]],[[-1.0]]) test_eq([[(float)1.0]],[[1.0]]) test_eq([[(float)-1.0]],[[-1.0]]) test_eq([[(float)1]],[[1.0]]) test_eq([[(float)-1]],[[-1.0]]) test_eq([[(string)1]],[["1"]]) test_eq([[(string)-1]],[["-1"]]) test_eq([[(string)1.0]],[["1.0"]]) test_eq([[(string)-1.0]],[["-1.0"]])
+
// Note: 32-bit floats overflow at ~3.4e38.
+
test_true([[has_value ((string)1e38, ".") ||
+
has_value ((string)1e38, "e")]])
+
test_true([[has_value ((string)-1e38, ".") ||
+
has_value ((string)-1e38, "e")]])
+
test_true([[has_value ((string)1e-38, ".") ||
+
has_value ((string)1e-38, "e")]])
+
test_true([[has_value ((string)-1e-38, ".") ||
+
has_value ((string)-1e-38, "e")]])
+
cond([[Float.DIGITS_10 >= 15]], [[ // Usual size with 64 bit IEEE floats.
+
// Note: 1e100 overflows to infinity with 32 bit floats.
test_true([[has_value ((string)1e100, ".") || has_value ((string)1e100, "e")]]) test_true([[has_value ((string)-1e100, ".") || has_value ((string)-1e100, "e")]])
-
+
]])
+
// Note: 1e-100 underflows to 0.0 with 32 bit IEEE floats, but that's ok.
test_true([[has_value ((string)1e-100, ".") || has_value ((string)1e-100, "e")]]) test_true([[has_value ((string)-1e-100, ".") || has_value ((string)-1e-100, "e")]]) test_true([[has_value ((string)124354236143512312334562453624.1, ".") || has_value ((string)124354236143512312334562453624.1, "e")]]) test_eq([[(string) 0.8]], [["0.8"]]) cond([[Float.DIGITS_10 >= 6]], [[ // Usual size with 32 bit IEEE floats. test_eq([[(string) 0.811113]], [["0.811113"]]) test_eq([[(string) 0.811114]], [["0.811114"]])