pike.git / src / testsuite.in

version» Context lines:

pike.git/src/testsuite.in:4950:    {    werror("_memory_usage()->%s has value %d which is <0\n",    type, value);    ret = 0;    }    return ret;   ]],1)      test_any([[    object q=class {}(); -  object o=_next(this_object()); -  while(zero_type(o)) o=_next(o); /* skip destructed */ +  object o=Debug.next(this_object()); +  while(zero_type(o)) o=Debug.next(o); /* skip destructed */    catch { if(objectp(o) || object_program(o)) return 1; }; -  o=_prev(this_object()); -  while(zero_type(o)) o=_prev(o); /* skip destructed */ +  o=Debug.prev(this_object()); +  while(zero_type(o)) o=Debug.prev(o); /* skip destructed */    catch { if(objectp(o) || object_program(o)) return 1; };    return 0;   ]],1)      test_any([[object(Stdio.File) o=Stdio.File(); return objectp(o);]],1)   test_any([[class Test {}; object(Test) o=Test(); return object_program(o);]],Test)   test_define_program(test,[[constant foo = 1; int a() { return foo; }]])   test_true(test()->a())   test_program(inherit test;)   test_program(inherit test; int a() { return foo; } )
pike.git/src/testsuite.in:7215:   test_eq("718046312823", [[ (string)012345671234567 ]])   test_eq("-718046312823", [[ (string)-012345671234567 ]])   test_eq("1125899906842624", [[ (string)0b100000000000000000000000000000000000000000000000000 ]])   test_eq("-1125899906842624", [[ (string)-0b100000000000000000000000000000000000000000000000000 ]])   test_eq(500000000 * 10, 5000000000)   test_eq(5000000000000000000 * 10, 50000000000000000000)      // Numbers that shouldn't be native integers. Has to resort to   // strange methods to test this since bignums behave like native   // integers in almost every way. - test_do([[ _next ((mixed) Int.NATIVE_MAX + 1) ]]) - test_do([[ _next ((mixed) Int.NATIVE_MIN - 1) ]]) + test_do([[ Debug.next ((mixed) Int.NATIVE_MAX + 1) ]]) + test_do([[ Debug.next ((mixed) Int.NATIVE_MIN - 1) ]])      // These numbers should be native integers. - test_eval_error([[ _next ((mixed) -0x80000000) ]]) - test_eval_error([[ _next ((mixed) -0x7fffffff) ]]) - test_eval_error([[ _next ((mixed) 0x7fffffff) ]]) - test_eval_error([[ _next ((mixed) Int.NATIVE_MAX) ]]) - test_eval_error([[ _next ((mixed) Int.NATIVE_MIN) ]]) + test_eval_error([[ Debug.next ((mixed) -0x80000000) ]]) + test_eval_error([[ Debug.next ((mixed) -0x7fffffff) ]]) + test_eval_error([[ Debug.next ((mixed) 0x7fffffff) ]]) + test_eval_error([[ Debug.next ((mixed) Int.NATIVE_MAX) ]]) + test_eval_error([[ Debug.next ((mixed) Int.NATIVE_MIN) ]])      // Test incrementations (FIXME: More cases?).   test_eq("2147483648",    [[ (string)(class { int f(int x) { x++; return x; } })()->f(0x7fffffff) ]])   test_eq("2147483648",    [[ (string)(class { int f(int x) { ++x; return x; } })()->f(0x7fffffff) ]])   test_eq("2147483648",    [[ (string)(class { int x=0x7fffffff;int f() { ++x;return x; } })()->f() ]])   test_eq("2147483648",    [[ (string)(class { int x=0x7fffffff;int f() { x++;return x; } })()->f() ]])
pike.git/src/testsuite.in:7452:   test_eq(-0x80000000000, [[ decode_value(encode_value(-0x80000000000)) ]])   test_eq(-0x800000000000, [[ decode_value(encode_value(-0x800000000000)) ]])   test_eq(-0x8000000000000, [[ decode_value(encode_value(-0x8000000000000))]])   test_eq(-0x12345678, [[ decode_value(encode_value(-0x12345678)) ]])   test_eq(-0x123456780, [[ decode_value(encode_value(-0x123456780)) ]])   test_eq(-0x1234567801, [[ decode_value(encode_value(-0x1234567801)) ]])   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))) ]]) + test_eval_error([[ Debug.next ((mixed) decode_value (encode_value (Int.NATIVE_MAX))) ]]) + test_eval_error([[ Debug.next ((mixed) decode_value (encode_value (Int.NATIVE_MIN))) ]]) + test_do([[ Debug.next ((mixed) decode_value (encode_value (Int.NATIVE_MAX + 1))) ]]) + test_do([[ Debug.next ((mixed) decode_value (encode_value (Int.NATIVE_MIN - 1))) ]])   test_eq(2147483648, -2147483648/-1)   test_eq(2147483648, -2147483648*-1)      test_true([[ random(0x7fffffff)+1 ]])   test_true([[ random(0x7ffffffff)+1 ]])   test_true([[ sqrt(0x7fffffff)+1 ]])   test_true([[ sqrt(0x7ffffffff)+1 ]])      test_true([[ catch { destruct((mixed)0x4783647824687234628462); } ]])