pike.git/
src/
testsuite.in
Branch:
Tag:
Non-build tags
All tags
No tags
2000-01-24
2000-01-24 03:28:29 by Martin Stjernholm <mast@lysator.liu.se>
3fcd53eb11ddcdc760756c62dc1a13310f7066b5 (
51
lines) (+
26
/-
25
)
[
Show
|
Annotate
]
Branch:
7.9
Defeated type checks in the has_index()/has_value() tests. Fixed a
typo.
Rev: src/testsuite.in:1.263
1:
-
test_true([["$Id: testsuite.in,v 1.
262
2000/01/
20
23
:
12
:
01
noring
Exp $"]]);
+
test_true([["$Id: testsuite.in,v 1.
263
2000/01/
24
03
:
28
:
29
mast
Exp $"]]);
cond([[all_constants()->_verify_internals]], [[
3726:
test_true(sizeof(rusage())>0) // - has_index
-
test_false([[ has_index(({}), 0) ]])
-
test_false([[ has_index(({}), "foo") ]])
-
test_false([[ has_index(({ "a" }), -1) ]])
-
test_false([[ has_index(({ "a" }), "a") ]])
-
test_true([[ has_index(({ "a" }), 0) ]])
-
test_false([[ has_index(({ "a" }), 1) ]])
-
test_true([[ has_index(({ "a", "b" }), 1) ]])
-
test_false([[ has_index(([ "a":"A" ]), 4711) ]])
-
test_true([[ has_index(([ "a":"A" ]), "a") ]])
-
test_false([[ has_index(([ "a":"A" ]), "A") ]])
-
test_true([[ has_index(([ "a":"A", "b":"B", "c":"C" ]), "b") ]])
-
test_false([[ has_index(([ "a":"A", "b":"B", "c":"C" ]), "B") ]])
+
test_false([[ has_index(
[mixed]
({}), 0) ]])
+
test_false([[ has_index(
[mixed]
({}), "foo") ]])
+
test_false([[ has_index(
[mixed]
({ "a" }), -1) ]])
+
test_false([[ has_index(
[mixed]
({ "a" }), "a") ]])
+
test_true([[ has_index(
[mixed]
({ "a" }), 0) ]])
+
test_false([[ has_index(
[mixed]
({ "a" }), 1) ]])
+
test_true([[ has_index(
[mixed]
({ "a", "b" }), 1) ]])
+
test_false([[ has_index(
[mixed]
([ "a":"A" ]), 4711) ]])
+
test_true([[ has_index(
[mixed]
([ "a":"A" ]), "a") ]])
+
test_false([[ has_index(
[mixed]
([ "a":"A" ]), "A") ]])
+
test_true([[ has_index(
[mixed]
([ "a":"A", "b":"B", "c":"C" ]), "b") ]])
+
test_false([[ has_index(
[mixed]
([ "a":"A", "b":"B", "c":"C" ]), "B") ]])
test_eval_error([[ has_index((class {})(), "foo") ]]) test_true([[has_index((class{array _indices(){return({"a","b"});}})(),"b")]]) // - has_value
-
test_false([[ has_value(({}), 0) ]])
-
test_false([[ has_value(({}), "foo") ]])
-
test_false([[ has_value(({ "a" }), -1) ]])
-
test_true([[ has_value(({ "a" }), "a") ]])
-
test_false([[ has_value(({ "a" }), 0) ]])
-
test_true([[ has_value(({ "a", "b" }), "b") ]])
-
test_false([[ has_value(([ "a":"A" ]), 4711) ]])
-
test_true([[ has_value(([ "a":"A" ]), "A") ]])
-
test_false([[ has_value(([ "a":"A" ]), "a") ]])
-
test_true([[ has_value(([ "a":"A", "b":"B", "c":"C" ]), "B") ]])
-
test_false([[ has_value(([ "a":"A", "b":"B", "c":"C" ]), "b") ]])
+
test_false([[ has_value(
[mixed]
({}), 0) ]])
+
test_false([[ has_value(
[mixed]
({}), "foo") ]])
+
test_false([[ has_value(
[mixed]
({ "a" }), -1) ]])
+
test_true([[ has_value(
[mixed]
({ "a" }), "a") ]])
+
test_false([[ has_value(
[mixed]
({ "a" }), 0) ]])
+
test_true([[ has_value(
[mixed]
({ "a", "b" }), "b") ]])
+
test_false([[ has_value(
[mixed]
([ "a":"A" ]), 4711) ]])
+
test_true([[ has_value(
[mixed]
([ "a":"A" ]), "A") ]])
+
test_false([[ has_value(
[mixed]
([ "a":"A" ]), "a") ]])
+
test_true([[ has_value(
[mixed]
([ "a":"A", "b":"B", "c":"C" ]), "B") ]])
+
test_false([[ has_value(
[mixed]
([ "a":"A", "b":"B", "c":"C" ]), "b") ]])
test_eval_error([[ has_value((class {})(), "foo") ]]) test_true([[has_value((class{array _values(){return({"a","b"});}})(),"b")]])
3795:
{ m = _m; }
-
}
+
}
;
mapping m = ([ ]); C o = C(m);