Branch: Tag:

2014-08-18

2014-08-18 15:19:04 by Martin Nilsson <nilsson@opera.com>

Fixed some GMP tests.

27:   test_eq(0x80000001-0x80000000, 1);   test_eq(0x80000000-0x80000001,-1);   test_eq(-2147483648*-1, -2147483648/-1); - cond([[ 0x8000000000000000 ]], - [[ +    test_eq(0x8000000000000000-0x8000000000000000, 0);   test_eq(0xf000000000000000-0xf000000000000000, 0);   test_eq(0x8000000000000001-0x8000000000000000, 1);   test_eq(0x8000000000000000-0x8000000000000001,-1);   test_eq(-9223372036854775808*-1, -9223372036854775808/-1); - ]]) +    test_true([[1.0e-40]]);   test_eq([[#"foo   bar"]],[["foo\nbar"]]);
47:      test_eq([["(" + 0x7fffffff + ")"]], "(2147483647)")   test_eq([["(" + -0x80000000 + ")"]], "(-2147483648)") - cond(0x8000000000000000, [[ +    test_eq([["(" + 0x7fffffffffffffff + ")"]], "(9223372036854775807)")   test_eq([["(" + -0x8000000000000000 + ")"]], "(-9223372036854775808)") - ]]) +    test_eq([["(" + Int.NATIVE_MAX + ")"]], [[sprintf ("(%d)", Int.NATIVE_MAX)]])   test_eq([["(" + Int.NATIVE_MIN + ")"]], [[sprintf ("(%d)", Int.NATIVE_MIN)]])   test_eq([[Int.NATIVE_MAX]], [[(int) (Int.NATIVE_MAX + "")]])
3079:   ]], [[ Protocols.HTTP.get_url_data ]])      test_compile([[float x=(gauge { return; },1.0);]]) - cond( [[ master()->resolv("Gmp")->mpz ]], - [[ +    test_compile_error([[object x = Gmp.mpz(17); constant y = x;]]) - ]]) +    test_any([[object(Stdio.File) f; f=Stdio.File(); return 1]],1)   test_compile([[float t=gauge { string foo; foo; };]])   test_compile_any([[class { object(Stdio.FILE) f; void create() { f=Stdio.FILE(); }}]])
7316:   test_equal(471100000000000000000000000000000000000000000000042,    (int)(mixed)471100000000000000000000000000000000000000000000042)   test_eq(6745697846498645967, -  [[ Gmp.mpz("6745697846498645967")->cast_to_int(); ]]) +  [[ (int)Gmp.mpz("6745697846498645967") ]])      test_eq(0x7fffffff, [[ decode_value(encode_value(0x7fffffff)) ]])   test_eq(0x7ffffffff, [[ decode_value(encode_value(0x7ffffffff)) ]])