pike.git/
src/
testsuite.in
Branch:
Tag:
Non-build tags
All tags
No tags
1998-12-21
1998-12-21 09:38:32 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
4fbfe2d648b23472c7ac59831ba7d90021cf2769 (
11
lines) (+
10
/-
1
)
[
Show
|
Annotate
]
Branch:
7.9
new efun: _typeof
Rev: src/builtin_functions.c:1.142
Rev: src/testsuite.in:1.137
1:
-
stest_true([["$Id: testsuite.in,v 1.
136
1998/12/
02
12
:
56
:
47
mast
Exp $"]])
+
stest_true([["$Id: testsuite.in,v 1.
137
1998/12/
21
09
:
38
:
32
hubbe
Exp $"]])
cond([[all_constants()->_verify_internals]], [[ test_do(_verify_internals())
897:
test_eq(typeof(0.0),"float") test_eq(typeof(all_constants()["all_constants"]),"mixed")
+
// _typeof
+
test_eq(_typeof(1),"int")
+
test_eq(_typeof(""),"string")
+
test_eq(_typeof("x"[0]),"int")
+
test_eq(_typeof(0.0),"float")
+
test_eq(_typeof(this_object)-" ","function(:object)")
+
+
// class test_true(programp(class c {})) test_true(functionp(clone(class c { int foo() { return 1; }})->foo))