pike.git
/
src
/
testsuite.in
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/testsuite.in:1:
START_MARKER
-
test_true([["$Id: testsuite.in,v 1.
891
2010/
02
/
23
10:
49
:
42
grubba
Exp $"]]);
+
test_true([["$Id: testsuite.in,v 1.
892
2010/
04
/
10
14
:
34
:
07
mast
Exp $"]]);
// This triggered a bug only if run sufficiently early. test_compile_any([[#pike 7.2]]) test_compile_any([[#pike 7.4]]) test_compile_any([[#pike 7.0]]) test_compile_any([[#pike 0.6]]) cond([[all_constants()->_verify_internals]], [[ test_do(_verify_internals())
pike.git/src/testsuite.in:12085:
// - version test_equal(version(), "Pike v"+__REAL_MAJOR__+"."+__REAL_MINOR__+" release "+__REAL_BUILD__) // - werror // - write // - zero_type test_eq(zero_type(0),0) test_eq(zero_type(([])[7]),1) test_eq(zero_type(UNDEFINED), 1)
+
test_eq (zero_type (m_delete (([]), 1)), 1)
test_true([[lambda (int|void a) { return zero_type(a); }()]]) test_true([[lambda () {mixed a; return zero_type(a = ([])[0]);}()]]) test_true([[lambda () {mapping a=([]); return zero_type(a[0] = ([])[0]);}()]]) test_true([[zero_type (lambda () {return ([])[0];}())]]) test_any([[ int i = lambda() {return UNDEFINED;}(); lambda (int x) {} (i += 17); return zero_type (i);
pike.git/src/testsuite.in:12117:
test_any([[ int i = lambda() {return UNDEFINED;}(); lambda (int x) {} (i--); return zero_type (i); ]], 0) test_any([[ int i = lambda() {return UNDEFINED;}(); return zero_type (-i); ]], 0)
+
test_any([[
+
// Preserve zero_type in call.
+
return lambda (mixed a) {return zero_type (a);} (UNDEFINED);
+
]], 1);
+
test_true([[zero_type (({UNDEFINED}))]], 1); // Preserve zero_type in array.
+
test_any([[zero_type (map (({1}), ([])))]], 1); // Produce zero_type in map().
+
test_any([[
+
// Preserve zero_type in foreach.
+
foreach (({UNDEFINED}), mixed e)
+
if (zero_type (e)) return 1;
+
return 0;
+
]], 1);
-
+
test_program(int b=10; mixed a() { return 1; }) test_program(mixed b=10; mixed a() { return 1;}) test_define_program(test,[[int q,w,e,r,t; mixed foo() { return 10; }]]) test_program(inherit test; mixed a() { return foo()==10; }) test_program(inherit test; mixed a() { return test::foo()==10; }) test_program(inherit test : bar; mixed a() { return bar::foo()==10; }) test_define_program(test2,[[int z,x,c,v,b; mixed bar() { return 11; }]]) test_program(inherit test; inherit test2; mixed a() { return foo()==10 && bar()==11; })