pike.git/
src/
testsuite.in
Branch:
Tag:
Non-build tags
All tags
No tags
2015-03-16
2015-03-16 16:55:34 by Martin Nilsson <nilsson@opera.com>
5c4aa9d9553b13a7f3605ce8656770ac4287c716 (
31
lines) (+
16
/-
15
)
[
Show
|
Annotate
]
Branch:
8.1
_next and _prev fixes.
4957:
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)
7222:
// 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",
7459:
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)