Branch: Tag:

2003-11-15

2003-11-15 17:36:04 by Martin Stjernholm <mast@lysator.liu.se>

Test that encoding and decoding integers near the native limits keep
nativeness.

Rev: src/testsuite.in:1.693

1: - test_true([["$Id: testsuite.in,v 1.692 2003/11/12 16:22:18 grubba Exp $"]]); + test_true([["$Id: testsuite.in,v 1.693 2003/11/15 17:36:04 mast Exp $"]]);      // This triggered a bug only if run sufficiently early.   test_compile_any([[#pike 7.2]])
5800:    test_eq(-0x12345678012, [[ decode_value(encode_value(-0x12345678012)) ]])    test_eq(-0x123456780123, [[ decode_value(encode_value(-0x123456780123)) ]])    test_eq(-0x1234567801234, [[ decode_value(encode_value(-0x1234567801234))]]) +  +  test_eval_error([[ _next ((mixed) decode_value (encode_value (Int.NATIVE_MAX))) ]]) +  test_eval_error([[ _next ((mixed) decode_value (encode_value (Int.NATIVE_MIN))) ]]) +  test_do([[ _next ((mixed) decode_value (encode_value (Int.NATIVE_MAX + 1))) ]]) +  test_do([[ _next ((mixed) decode_value (encode_value (Int.NATIVE_MIN - 1))) ]])   ]])      cond([[ sizeof( cpp("__AUTO_BIGNUM__")/"__AUTO_BIGNUM__" ) == 1 ]],