pike.git/
src/
testsuite.in
Branch:
Tag:
Non-build tags
All tags
No tags
2002-01-18
2002-01-18 05:17:17 by Martin Nilsson <mani@lysator.liu.se>
b0319a53a864009294d1fe8b55d3b23adb4f8048 (
22
lines) (+
21
/-
1
)
[
Show
|
Annotate
]
Branch:
7.9
Some int2char and int2hex tests.
Rev: src/testsuite.in:1.481
1:
-
test_true([["$Id: testsuite.in,v 1.
480
2002/01/
04
14
:
14
:
26
grubba
Exp $"]]);
+
test_true([["$Id: testsuite.in,v 1.
481
2002/01/
18
05
:
17
:
17
nilsson
Exp $"]]);
cond([[all_constants()->_verify_internals]], [[
7476:
test_equal(mkmultiset(indices(class{constant a="a"; constant b="b";}())), (<"a","b">))
+
// - int2char
+
test_equal(int2char(0), "\0")
+
test_equal(int2char(65), "A")
+
test_equal(int2char(256), "\400")
+
test_equal(int2char(65536), "\200000")
+
+
// - int2hex
+
test_equal(int2hex(0), "0")
+
test_equal(int2hex(1), "1")
+
test_equal(int2hex(-1), "-1")
+
test_equal(int2hex(15), "f")
+
test_equal(int2hex(-15), "-f")
+
test_equal(int2hex(16), "10")
+
test_equal(int2hex(-16), "-10")
+
test_equal(int2hex(-0x80000000), "-80000000")
+
test_equal(int2hex(0x80000000-1), "7fffffff")
+
test_equal(int2hex(-0x800000000), "-800000000")
+
test_equal(int2hex(0x800000000-1), "7ffffffff")
+
// - Array.longest_ordered_sequence test_equal(Array.longest_ordered_sequence("dfgaokäpojghadjjioijrgxcvb"/""), ({ 0, 1, 2, 10, 11, 16, 18, 19, 20, 22 }));