pike.git
/
src
/
testsuite.in
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/testsuite.in:842:
[[ (0xffffffff == -1)?16:0 ]]); test_any([[ int a=0xffffffff; return a>>17 ]], [[ (0xffffffff == -1)?-1:0x7fff ]]); dnl Check the derived return type of sprintf(). test_any([[return sprintf("%O", typeof(sprintf("%1H", "foo"))); ]], "string(8bit)"); test_any([[return sprintf("%O", typeof(sprintf("foo"))); ]], "string(102..111)"); test_any([[return sprintf("%O", typeof(sprintf("foo%c", 17))); ]],
-
"string(17
..17
| 102..111)");
+
"string(17 | 102..111)");
test_any([[return sprintf("%O", typeof(sprintf("%2c\n", 'a'))); ]], "string(8bit)"); dnl Note the following tests the return type of int2char(). test_any([[return sprintf("%O", typeof(sprintf("%c", 1023))); ]],
-
"string(1023
..1023
)");
+
"string(1023)");
test_any([[return sprintf("%O", typeof(sprintf("%c\n", 1023))); ]],
-
"string(10
..10
| 1023
..1023
)");
+
"string(10 | 1023)");
dnl The following is due to (string & sprintf_result) == sprintf_result. test_any([[return sprintf("%O", typeof(sprintf("%c\n", Stdio))); ]], sprintf("%O", sprintf_result)); test_any([[return sprintf("%O", typeof(sprintf("%4[1]c", 17))); ]], "string(8bit)"); test_any([[return sprintf("%O", typeof(sprintf("%[1]n", 17))); ]], "string(zero)"); test_any([[return sprintf("%O", typeof(aggregate("foo")));]], "array(string(102..111))"); test_any([[int a; return sprintf("%O", typeof(aggregate(a)));]], "array(int)");
pike.git/src/testsuite.in:937:
class Toplevel { class Foo { auto a = 10; auto b = typeof(a); }; string test() { return sprintf("a%Ob%O", typeof(Foo()->a),typeof(Foo()->b)); }; }; return Toplevel()->test();
-
]], "aint(10
..10
)btype(int(10
..10
))");
+
]], "aint(10)btype(int(10))");
test_any([[{ class Toplevel { class Foo { auto test(){ return 10;return 20;return 30; }; }; string test() { return sprintf("%O", typeof(Foo()->test)); } }; return Toplevel()->test()-" ";
-
}]], "function(:int(10
..10
)|int(20
..20
)|int(30
..30
))");
+
}]], "function(:int(10)|int(20)|int(30))");
test_any([[{ class Foo { mixed m; }; class Bar { inherit Foo; string m;
pike.git/src/testsuite.in:8423:
test_do(signal(signum("SIGFPE"),lambda() { add_constant("AFJLLAF",17); })) test_do(kill(getpid(),signum("SIGFPE"))) test_do(sleep(2)) test_eq(AFJLLAF,17) test_do(add_constant("AFJLLAF")) test_do(signal(signum("SIGFPE"), 0)) test_do(signal(signum("SIGFPE"))) ]]) // typeof
-
test_eq(sprintf("%O", typeof(1)),"int(1
..1
)")
+
test_eq(sprintf("%O", typeof(1)),"int(1)")
test_eq(sprintf("%O", typeof("")),"string(zero)") ignore_warning("Indexing the empty string.", [[ test_aq([[ sprintf("%O", typeof(""[0])) ]], "zero") ]]) test_eq(sprintf("%O", typeof(0.0)),"float") test_eq(sprintf("%O", typeof(all_constants()["all_constants"])),"mixed") // _typeof
-
test_eq(sprintf("%O", _typeof(1)),"int(1
..1
)")
+
test_eq(sprintf("%O", _typeof(1)),"int(1)")
test_eq(sprintf("%O", _typeof("")),"string(zero)")
-
test_eq(sprintf("%O", _typeof("x"[0])),"int(120
..120
)")
+
test_eq(sprintf("%O", _typeof("x"[0])),"int(120)")
test_eq(sprintf("%O", _typeof(0.0)),"float") test_eq([[sscanf(sprintf("%Ox", _typeof(this_object))-" ", "function(void|int(0..%*[0-9]):object)%*c")]], 2) // class test_true(programp(class {})) test_true(functionp(class { int foo() { return 1; }}()->foo)) test_true(class { int foo() { return 1; }}()->foo()) test_true(class { int i=1; }()->i)