pike.git
/
src
/
testsuite.in
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/testsuite.in:1:
-
test_true([["$Id: testsuite.in,v 1.
551
2002/10/15
14
:
21
:
00
marcus Exp $"]]);
+
test_true([["$Id: testsuite.in,v 1.
552
2002/10/15
16
:
34
:
14
marcus Exp $"]]);
// This triggered a bug only if run sufficiently early. test_compile_any([[#pike 7.2]]) cond([[all_constants()->_verify_internals]], [[ test_do(_verify_internals()) ]]); test_eq(1e1,10.0); test_eq(1E1,10.0);
pike.git/src/testsuite.in:5477:
cond([[ sizeof( cpp("__AUTO_BIGNUM__")/"__AUTO_BIGNUM__" ) == 1 ]], [[ // - Left shift. test_eq("1073741824", [[ (string)(1<<30) ]]) test_eq("2147483648", [[ (string)(1<<31) ]]) test_eq("4294967296", [[ (string)(1<<32) ]]) test_eq("8589934592", [[ (string)(1<<33) ]]) test_eq("1267650600228229401496703205376", [[ (string)(1<<100) ]])
+
test_eval_error(function f=`<<; f(1, 100000000000000))
+
test_eval_error(function f=`<<; f(-1, 100000000000000))
+
test_eq(0<<100000000000000, 0)
+
test_eval_error(function f=`<<; f(100000000000000, 100000000000000))
+
test_eval_error(function f=`<<; f(-100000000000000, 100000000000000))
+
// - Right shift. test_eq("53265209898187398182", [[ (string)((int)"54543574935743895738479">>10) ]]) test_false([[ objectp((int)"54543574935743895738479">>60) ]]) test_eq(0, [[ 25>>30 ]]) test_eq(0, [[ 25>>31 ]]) test_eq(0, [[ 25>>32 ]]) test_eq(0, [[ 25>>33 ]])
-
+
test_eq(1>>100000000000000, 0)
+
test_eq(-1>>100000000000000, -1)
+
test_eq(0>>100000000000000, 0)
+
test_eq(100000000000000>>100000000000000, 0)
+
test_eq(-100000000000000>>100000000000000, -1)
+
// - abs. test_eq("2147483648", [[ (string)abs(-0x80000000) ]]) test_eq("2147483648", [[ (string)abs(0x80000000) ]]) test_eq("2147483649", [[ (string)abs(0x80000001) ]]) test_eq("2147483649", [[ (string)abs(-0x80000001) ]]) // - Add. test_eq("2147483648", [[ (string)(0x7fffffff + 1) ]]) test_eq("2147483649", [[ (string)(0x7fffffff + 2) ]]) test_eq("2684354560", [[ (string)(0x50000000 + 0x50000000) ]])