pike.git
/
src
/
testsuite.in
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/testsuite.in:1:
START_MARKER // This triggered a bug only if run sufficiently early. test_compule_any([[#pike 7.6]]) test_compile_any([[#pike 7.8]]) test_compile_any([[#pike 8.0]]) test_compile_any([[#pike 8.1]]) test_compile_any([[#pike 8.2]])
-
cond
(
[[all
_
constants()->_
verify_internals
]]
,
+
ifefun
(_verify_internals,
[[ test_do(_verify_internals()) ]]); test_eq(1e1,10.0); test_eq(1E1,10.0); test_eq(1e+1,10.0); test_eq(1.1e1,11.0); test_eq(1e-1,0.1); test_eq('\x20',32); test_eq("\x20","\040");
pike.git/src/testsuite.in:2348:
test_compile_error(""()) test_compile_error(([])()) test_compile_error(([])()) test_any([[ class X { int y; class Z { void destroy() { y++; } } }; X x=X(); destruct(x->Z()); return x->y;]],1) test_eval_error([[ class Z { int destroy() { return 1/y; } }(); ]]) test_any([[ class X { int y; class Z { protected void destroy() { y++; } } }; X x=X(); destruct(x->Z()); return x->y;]],1) test_any([[ class X { int y; class Z { protected void create() { y++; } } }; X x=X(); destruct(x->Z()); return x->y;]],1)
-
cond
(
[[all
_
constants()->_
debug
]]
,
+
ifefun
(_debug,
[[ test_do(_debug(_debug(0))) ]]) test_do(indices(_static_modules)) test_compile_any([[import Stdio; class x { string y() { read_file("foo"); } }]]) dnl ---------------------------------------------------------------- dnl backtrace/linenumber tests dnl ----------------------------------------------------------------
pike.git/src/testsuite.in:5147:
test_compile_error_any(master()->add_precompiled_program(\"/test\",compile_string(\"int foo() { return 17; }\",\"62\"))) test_any([[function f=random_seed; int t; foreach(allocate(1),t) f(t); return 1;]],1) test_compile([[while(0)if(0)continue;else;]]) test_compile([[do { break; } while (0);]]) test_program([[int b=1,c; int a() { c=b+2; return c==3; }]]) test_true([[ ("foobar"/"o") & ({ "foo" }) ]]) test_any([[ array a="foo bar"/" "; return sizeof(a & ({"foo"}))]],1)
-
cond
(
[[all
_
constants()->_
verify_internals
]]
,
+
ifefun
(_verify_internals,
[[ test_do(_verify_internals()) ]]) cond_begin([[all_constants()->thread_create]]) // thread_create test_do(thread_create(lambda() { })) // /precompiled/mutex
pike.git/src/testsuite.in:7745:
// now the bignum ones test_any([[int k=10->pow(30); int j=k+1; array a=({k+17,k+16,k+13,k+14,k+12,k,k+9}); array b=({j+16,j+15,j+12,j+13,j+11,j-1,j+8}); return sizeof( a&b )]],7); test_any([[int k=10->pow(30); int j=k+1; array a=({k+17,k+16,k+13,k+14,k+12,k,k+9}); array b=({j+13,j+11,j-1,j+8,j+16,j+15,j+12}); return sizeof( a-b )]],0);
-
cond
(
[[all
_
constants()->_
verify_internals
]]
,
+
ifefun
(_verify_internals,
[[ test_do(_verify_internals()) ]]) test_eq("\377"[0],255) test_do(add_constant("foo",class c {int i;}())) test_eq(foo->i,0) test_do(foo->i=17) test_eq(foo->i,17) test_do(add_constant("foo"));
pike.git/src/testsuite.in:9489:
gnu(@indices (all_constants()), gauge { foreach (({1,2,3}), int j) do if (j && gnu(@indices (all_constants()), 17 + gauge {break foo;})) return 0; while (0); }); ]])
-
cond
(
[[all
_
constants()->_
verify_internals
]]
,
+
ifefun
(_verify_internals,
[[ test_do(_verify_internals()) ]]) test_compile_any([[import Stdio.Readline; mapping x=([]);]]) // testing preprocessor test_eq([[cpp("#define FOO(X,Y) (X) (Y)\nFOO( (A),(B) )")]],"#line 1 \"-\"\n\n( (A) ) ( (B) )") test_eq([[cpp("#define FOO(X)\nFOO BAR")]],"#line 1 \"-\"\n\nFOO BAR") test_eq([[cpp("#define F 'F'\nF")]],"#line 1 \"-\"\n\n'F'")
pike.git/src/testsuite.in:10463:
// - __placeholder_object // - _describe_program // - _disable_threads // - _do_call_outs // - _exit // - _memory_usage // - _static_modules // - _typeof // - _verify_internals
-
cond
(
[[all
_
constants()->_
verify_internals
]]
,
+
ifefun
(_verify_internals,
[[ test_do(_verify_internals()) ]]) // - `! // - `!= // - `% // - `& // - `() // - `*
pike.git/src/testsuite.in:10562:
test_equal(aggregate_mapping(1,2,3,4), ([1:2,3:4])) test_eval_error(aggregate_mapping(1,2,3)) // - alarm // - all_constants test_true(mappingp(all_constants())) test_eq(all_constants()["all_constants"],all_constants) // - all_threads
-
cond
(
[[all_constants()->
thread_create
]]
,
+
ifefun
(thread_create,
[[ test_true(arrayp(all_threads())) test_true(sizeof(all_threads())) test_true(objectp(all_threads()[0])) ]]) // - allocate test_equal(allocate(0),({})) test_equal(allocate(2),({0,0})) test_false(allocate(2)==({0,0}))
pike.git/src/testsuite.in:11256:
// - intp // Tested in foop // - is_absolute_path // Tested in lib // - kill // - load_module // - localtime
-
cond
(
[[all_constants()->
localtime
]]
,[[
+
ifefun
(localtime,[[
test_true(mappingp(localtime(0))) test_do([[int t = -1; catch(localtime(t));]]) ]]) cond([[all_constants()->localtime && all_constants()->mktime]], [[ test_any([[int x=time(); return mktime(localtime(x)) == x;]], 1) test_any([[int x=time(); for(int y=0;y<100;y++) if(mktime(localtime(x+y)) != x+y) return x+y; return 0;]], 0) ]])
pike.git/src/testsuite.in:11426:
return mkmapping(a,a); ]], (["a":"a"])) test_equal(mkmapping( ({({})}),({({})}) )[ ({}) ], ({})) // - mkmultiset test_equal(mkmultiset(({})), (<>)) test_equal(mkmultiset(({0})), (<0>)) test_equal(mkmultiset(({(<>)})), (<(<>)>)) // - mktime
-
cond
(
[[all_constants()->
mktime
]]
,
+
ifefun
(mktime,
[[ test_true([[mktime( ([ "sec":58, "isdst":1, "year":98, "mon":3, "mday":26, "hour":1, "min":51 ]))]])
pike.git/src/testsuite.in:12720:
}; tz_ux(0); ]]); // string[]= test_any([[string s="foo"; s[2]='t'; s[0]--; return s;]],"eot") test_any([[string s="foo"; s[2]=0777; s[1]--; return s;]],"fn\777") test_any([[string s="foo"; s[2]=07777777; s[1]--; return s;]],"fn\7777777") test_any([[string s="foo"; s[2]='t'; catch (s[10]='x'); return s;]], "fot")
-
cond
(
[[all
_
constants()->_
verify_internals
]]
,
+
ifefun
(_verify_internals,
[[ test_do(_verify_internals()) ]]) test_tests([[ array a() { return Tools.Testsuite.run_script ("]]SRCDIR[[/test_resolve.pike"); } ]])