pike.git / src / testsuite.in

version» Context lines:

pike.git/src/testsuite.in:3296:   #pragma dynamic_dot    // Test dynamic module indexing.    object protocols = Protocols;    return protocols.HTTP.get_url_data;   ]], [[ Protocols.HTTP.get_url_data ]])      test_compile([[float x=(gauge { return; },1.0);]])   test_compile_error([[object x = Gmp.mpz(17); constant y = x;]])   test_any([[object(Stdio.File) f; f=Stdio.File(); return 1]],1)   test_compile([[float t=gauge { string foo; foo; };]]) - test_compile_any([[class { object(Stdio.FILE) f; void create() { f=Stdio.FILE(); }}]]) + test_compile_any([[class Foo { object(Stdio.FILE) f; void create() { f=Stdio.FILE(); }}]])   test_eq([[compile_string("#define A(X) (X)\nint x() { return A \n\t(1); }")()->x()]],1)      test_any([[class G { mapping t=([]);    class tO { void init(string name) { t[name]=this; }}    class W { inherit tO; void create() { init("foo"); }}   }; object x=G(); x->W(); return objectp(x->t->foo)]],1)      test_program([[class foo { program x() { return class {}; }}; class bar { inherit foo; program x() { return class {}; }} int a() { return foo()->x != bar()->x(); }]])      test_any([[
pike.git/src/testsuite.in:4478:    protected class g { object e() { return gazonk(); }};    void create() { g()->e(); }}; return objectp(X()); ]],1)   test_any([[class A { int x=1; }; class B { protected inherit A; int foo() { return A::x; }}; return A()->x && !B()->x && B()->foo()==A()->x;]],1)   test_any([[class C { int q() { return p(); } int p() { return 17; }}; return C()->q();]],17)   test_any([[class C1 {    class D { string id() { return "foo"; } };    class Y { program YinD() { return D; }} };    class C2 { inherit C1; class D { string id() { return "bar"; } } };    return C2()->Y()->YinD()()->id()]],"bar")   test_any([[object o=class {int c;class bar{void create(){c++;};}}(); o->bar(); return o->c;]],1) - test_do([[add_constant("GURKA2",class foo { int c; class bar{void create() {c+=17;}}}()); ]]) - test_any([[class x { inherit GURKA2.bar; }(); return GURKA2->c;]],17) - test_any([[class x { inherit GURKA2.bar; }(); return GURKA2->c;]],34) + test_do([[add_constant("GURKA2",class { int c; class bar{void create() {c+=17;}}}()); ]]) + test_any([[class { inherit GURKA2.bar; }(); return GURKA2->c;]],17) + test_any([[class { inherit GURKA2.bar; }(); return GURKA2->c;]],34)    - test_do([[add_constant("GURKA2",class foo { int c; class bar{void create() { class sune { void create() {c+=17;}}(); }}}()); ]]) + test_do([[add_constant("GURKA2",class { int c; class bar{void create() { class { void create() {c+=17;}}(); }}}()); ]])   test_any([[class { inherit GURKA2.bar; }(); return GURKA2->c;]],17)   test_any([[class { inherit GURKA2.bar; }(); return GURKA2->c;]],34)   test_do([[add_constant("GURKA2");]]);      test_eq(class { protected int foo=17; }()->foo,0)   test_eval_error(class c { protected int foo=17; }()->foo=18;)   test_equal( [[ ({ (["foo":"bar"]), (<"foo">), ([]) })->foo ]], [[ ({"bar",1,0}) ]])   test_any([[mixed a=({([]),0}); a[1]=a; return a->foo[0];]],0)   test_eval_error([[return column(({0}),"foo");]])   
pike.git/src/testsuite.in:7997:   // _typeof   test_eq(sprintf("%O", _typeof(1)),"int(1..1)")   test_eq(sprintf("%O", _typeof("")),"string(zero)")   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()) - test_true(class c { int i=1; }()->i) - test_false(class c { int foo() { return 1; }}()->bar) - test_eq(class c { program foo=class c { int i=20; }; }()->foo()->i,20) + 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) + test_false(class { int foo() { return 1; }}()->bar) + test_eq(class { program foo=class c { int i=20; }; }()->foo()->i,20)      // class()   test_true(programp(class (){}))   test_equal(indices(class (string a,protected int b){}("foo",0)), ({"a"}))   test_equal(values(class (string a,protected int b){}("foo",0)), ({"foo"}))   test_true(programp(class (string ... a){}))   test_equal(indices(class (string a,protected int ... b){}("foo",0)), ({"a"}))   test_equal(values(class (protected string a, int ... b){}("foo",0)), ({({0})}))      test_do([[