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.
771
2006
/
12
/
29
16:
03
:
21
nilsson
Exp $"]]);
+
test_true([["$Id: testsuite.in,v 1.
772
2007
/
03
/
20
16:
55
:
07
grubba
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:330:
test_any([[int a=0xffffffff; return a|17]], 0xffffffff); test_any([[int a=0xffffffff; return a<<17]], 0x1fffffffe0000); test_any([[ int a=0xffffffff; return a/17 ]], [[ (0xffffffff == -1)?-1:0x0f0f0f0f ]]); test_any([[ int a=0xffffffff; return a%17 ]], [[ (0xffffffff == -1)?16:0 ]]); test_any([[ int a=0xffffffff; return a>>17 ]], [[ (0xffffffff == -1)?-1:0x7fff ]]);
-
test_any([[return sprintf("%O", typeof(aggregate("foo")));]], "array(string)");
+
test_any([[return sprintf("%O", typeof(aggregate("foo")));]], "array(string
(8
)
)
");
test_any([[int a; return sprintf("%O", typeof(aggregate(a)));]], "array(int)"); test_any([[int|string a; string s = sprintf("%O", typeof(aggregate(a))); return (< "array(string | int)", "array(int | string)" >)[s];]], 1); test_any([[return sprintf("%O", typeof(aggregate()));]], "array(zero)"); test_any([[int i; return (< "int", "int | zero", "zero | int" >) [sprintf("%O", typeof(max(i,0)))];]], 1) test_any([[array(string) a; return sprintf("%O", typeof(a[0])); ]], "string")
pike.git/src/testsuite.in:3491:
void `->x1=(int z) { x1::x = z; } int `->x2() { return x2::x; } void `->x2=(int z) { x2::x = z; } }; Y y = Y(); y->x1 = 1; y->x2 = 2; return (y->x1 + y->x2) * y->x; ]], 6)
+
test_compile_error([[
+
class X {
+
int x;
+
int `->x() { return 0; }
+
};
+
]])
+
+
test_compile_error([[
+
class X {
+
int `->x() { return 0; }
+
int x;
+
};
+
]])
+
+
test_compile_error([[
+
class X {
+
int x;
+
void `->x=(int z) { }
+
};
+
]])
+
+
test_compile_error([[
+
class X {
+
void `->x=(int z) { }
+
int x;
+
};
+
]])
+
+
test_compile_error([[
+
class X {
+
void `->x(int z) { }
+
};
+
]])
+
+
// Disabled for now.
+
cond([[ 0 ]], [[
+
test_compile_error([[
+
class X {
+
int `->x=() { }
+
};
+
]])
+
]])
+
+
test_compile_warning([[
+
class X {
+
static int `->x() { return 0; }
+
private void `->x=(int x) { }
+
};
+
]])
+
+
test_compile_warning([[
+
class X {
+
static int `->x() { return 0; }
+
void `->x=(int x) { }
+
};
+
]])
+
test_do([[ // bug 3006 class X { constant foo = Foo; class Foo {} void bar() { foo f = Foo(); } };
pike.git/src/testsuite.in:6361:
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("")),"string")
-
test_eq(sprintf("%O", typeof(""[0])),"int")
+
test_eq(sprintf("%O", typeof("")),"string
(0)
")
+
test_eq(sprintf("%O", typeof(""[0])),"int
(0..0)
")
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("")),"string")
+
test_eq(sprintf("%O", _typeof("")),"string
(0)
")
test_eq(sprintf("%O", _typeof("x"[0])),"int(120..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 c {})) test_true(functionp(class c { int foo() { return 1; }}()->foo)) test_true(class c { int foo() { return 1; }}()->foo())