pike.git
/
src
/
testsuite.in
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/testsuite.in:3682:
class X { int i = 17; class Y { constant i = 18; mixed f (int i) {return ({i, Y::i, X::i});} } } int a() {return equal (X()->Y()->f (19), ({19, 18, 17}));} ]])
-
test_compile_error_any([[
-
#pike 7.2
-
class X {
-
int i = 17;
-
class Y {
-
constant i = 18;
-
mixed f (int i) {return ({i, Y::i, X::i});}
-
}
-
}
-
]])
+
test_compile_error_any([[ class X { constant i = 18; mixed f() {return Y::i;} } ]]) test_program([[ class A {
pike.git/src/testsuite.in:3715:
inherit A: Y; class Y { constant i = 18; mixed f() {return Y::i;} } } int a() {return X()->Y()->f() == 18;} ]]) test_program([[
-
#pike 7.2
+
class A {
-
int i = 17;
-
}
-
class X {
-
inherit A: Y;
-
class Y {
-
constant i = 18;
-
mixed f() {return Y::i;}
-
}
-
}
-
int a() {return X()->Y()->f() == 17;}
-
]])
-
-
test_program([[
-
class A {
+
string s = "A"; } class B { constant s = "B"; } class X { constant s = "X"; inherit A; class Y { inherit B: A;
pike.git/src/testsuite.in:3829:
string p = \"g\"; mixed f (string p) {return ({global::p, p});}")()->f ("l"); ]], ({"g", "l"})) test_eval_error([[ compile_string (#" string pp = \"g\"; mixed f (string p) {return global::p;}"); ]])
-
test_eval_error([[
-
compile_string (#"
-
#pike 7.2
-
string p = \"g\";
-
mixed f (string p) {return global::p;}");
-
]])
-
+
test_equal([[ compile_string (#" int x = 23; class A { constant x = 24; } inherit A; class X { int x = 32; mixed f (int x) {return ({global::x, global::A::x, X::x, x});} }")()->X()->f (33); ]], ({23, 24, 32, 33})) // Testing 'global.' test_compile([[ mixed a() {return global.Parser.HTML;}; a; ]], 0);
-
test_compile_error([[
-
#pike 7.2
-
mixed a() {return global.Parser.HTML;}
-
]], 0);
-
+
test_any([[ if (!programp (Parser.HTML)) error ("This test uses the existence of Parser.HTML.\n"); return compile_string (#" class Parser {constant HTML = 1;} mixed foo() {return programp (Parser.HTML);}")()->foo(); ]], 0); test_any([[ if (!programp (Parser.HTML)) error ("This test uses the existence of Parser.HTML.\n"); return compile_string (#"
pike.git/src/testsuite.in:3965:
class blorg { inherit fnord; int ber() { return 2; } }; return blorg()->goo(); ]],3) test_compile_error_any([[class X {int x; int f() {return local::x;}}]])
-
test_compile_any([[
-
#pike 7.2
-
class X {int x; int f() {return local::x;}}
-
]])
+
// Testing the 'inline' keyword test_program([[class foo { inline int c() { return time(); } int d() { return c(); } }; class bar { inherit foo; int c() { return 0; } } int a() { return bar()->d(); }]],0) test_compile_any([[ class top { class the_class { }
pike.git/src/testsuite.in:10482:
// - cd // - ceil // Tested in _math // - chmod // - chown // - chroot // - cleargroups
-
-
// - new/clone
-
test_true([[
-
#pike 7.2
-
objectp(new(compile_string("int foo() { return 17; }"))) ]])
-
test_eq([[
-
#pike 7.2
-
new(compile_string("int foo() { return 17; }"))->foo() ]],17)
-
test_true([[
-
#pike 7.2
-
objectp(clone(compile_string("int foo() { return 17; }"))) ]])
-
test_eq([[
-
#pike 7.2
-
clone(compile_string("int foo() { return 17; }"))->foo() ]],17)
-
+
// - closelog // - column test_equal([[column(({({1,2,3}),({5,6,7}),({8,9,0})}),0)]],[[({1,5,8})]]) test_equal([[column(({({1,2,3}),({5,6,7}),({8,9,0})}),1)]],[[({2,6,9})]]) test_equal([[column(({({1,2,3}),({5,6,7}),({8,9,0})}),2)]],[[({3,7,0})]]) test_any_equal([[ array a = ({({(["foo": 17])})}); mixed res = column (a, "foo"); // Avoid constant optimization. return res && a[0][0];