pike.git / src / testsuite.in

version» Context lines:

pike.git/src/testsuite.in:1:   START_MARKER      // 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.6]])   test_compile_any([[#pike 7.8]]) -  + test_compile_any([[#pike 8.0]])      cond([[all_constants()->_verify_internals]],   [[    test_do(_verify_internals())   ]]);   test_eq(1e1,10.0);   test_eq(1E1,10.0);   test_eq(1e+1,10.0);   test_eq(1.1e1,11.0);   test_eq(1e-1,0.1);
pike.git/src/testsuite.in:560:      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)");   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)");   test_any([[return sprintf("%O", typeof(sprintf("%c\n", 1023))); ]],    "string(10..10 | 1023..1023)"); -  + dnl The following is due to (string & sprintf_result) == sprintf_result.   test_any([[return sprintf("%O", typeof(sprintf("%c\n", Stdio))); ]], -  "string"); +  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)");   test_any([[int|string a;    string s = sprintf("%O", typeof(aggregate(a)));    return (< "array(string) | array(int)", "array(string | int)", "array(int | string)" >)[s];]], 1);
pike.git/src/testsuite.in:4693:   test_equal([[ "foo"[ ({ 2,0,1,2 })[*] ] ]],    [[ ({ 'o', 'f', 'o', 'o' }) ]])      test_equal([[ ({ ({1}), ({2}), ({3}) })[*][0] ]],    [[ ({ 1,2,3 }) ]])      test_equal([[ ({ ({1,2}), ({3,4}), ({5,6}) })[*][ ({0,1,1})[*] ] ]],    [[ ({ 1,4,6 }) ]])      // map tests + test_eq(map("abc", `+, 1), "bcd") + test_equal(map((["a":1,"b":2]), `+, 1), (["a":2,"b":3])) + test_equal(map((<1,2,3>), `+, 1), (<2,3,4>)) + test_any_equal(class A { constant a=1; constant b=2; }; return map(A, `+ ,1);, (["a":2,"b":3])) + test_any_equal(class A { protected mixed cast(string t) { if(t=="mapping") return (["a":1,"b":2]);}}; return map(A(), `+, 1);, (["a":2,"b":3])) + test_any_equal(class A { protected mixed cast(string t) { if(t=="array") return ({1,2,3});}}; return map(A(), `+, 1);, ({2,3,4})) + test_any_equal(class A { protected mixed cast(string t) { if(t=="multiset") return (<1,2,3>);}}; return map(A(), `+, 1);, (<2,3,4>))   test_any_equal(array a = ({({1,0,0}),({1,1,0}),({0,1,1})}); return map(a,`[],1);,    ({0,1,1}))   test_any_equal(array a = ({({1,0,0}),({1,1,0}),({0,1,1})}); map(a,`[]=,1,0); return a;,    ({({1,0,0}),({1,0,0}),({0,0,1})}))   test_any_equal(array a = ({(<1>),(<1,2>),(<2,3>),(<1,3>)}); return map(a,`[],1);,    ({1,1,0,1}))   test_any_equal(array a = ({(<1>),(<1,2>),(<2,3>),(<1,3>)}); map(a,`[]=,1,0); return a;,    ({(<>),(<2>),(<2,3>),(<3>)}))   test_any_equal(array a = ({(<"a">),(<"b">),(<>)}); map(a,`->=,"a",1); return a;,    ({(<"a">),(<"a","b">),(<"a">)}))
pike.git/src/testsuite.in:4752:    ({(["a":1]),(["a":1])}),    (["a":1,"b":"d"])}))   test_any_equal([[    array a = ({({(["a":"b"]),([]),(["c":17])}),({(["a":"b"]),(["a":7])}),(["b":"d"])});    map(a,`->=,"a",1);    return a;   ]], ({({(["a":1]),(["a":1]),(["a":1,"c":17])}),    ({(["a":1]),(["a":1])}),    (["a":1,"b":"d"])}))    +    test_any_equal([[    /* This test tests a wild program pointer in the object o. The bug can trig    a coredump in a later test. */    class A {    array a = ({1});    void `->= (string var, mixed val) {::`->= (var, val);}    };    class B {    inherit A;    void `->= (string var, mixed val) {if (var) ::`->= (var, val);}
pike.git/src/testsuite.in:9546:   test_true(floatp(__VERSION__))   test_true(floatp(__REAL_VERSION__))   test_true(intp(__MAJOR__))   test_true(intp(__REAL_MAJOR__))   test_true(intp(__MINOR__))   test_true(intp(__REAL_MINOR__))   test_true(intp(__BUILD__))   test_true(intp(__REAL_BUILD__))   test_eq(__PIKE__,1)    + test_any_equal([[ +  int base = __COUNTER__; + #define X __COUNTER__ +  return map( ({ __COUNTER__, X, __COUNTER__ }), `-, base); + ]], [[ ({ 1,2,3 }) ]]) + test_any_equal([[ +  int base = __COUNTER__; + #define X __COUNTER__ +  return map( ({ __COUNTER__, X, __COUNTER__ }), `-, base); + ]], [[ ({ 1,2,3 }) ]]) + test_do(add_constant("COUNTER",__COUNTER__)) + test_eq(__COUNTER__-1,COUNTER) + test_do(add_constant("COUNTER")) +    test_eq( compile_string("string a=#\"a\nb\";")()->a, "a\nb" )   test_eq( compile_string("string a=#\"a\r\nb\";")()->a, "a\nb" )   test_eq( compile_string("string a=#\"a\n\rb\";")()->a, "a\nb" )      // #define   test_any([[   #define FOOa 1   return FOOa;   ]],1)