pike.git / src / testsuite.in

version» Context lines:

pike.git/src/testsuite.in:890:    protected void create(int blag = bar) { bar += blag; }    };       return ({ foo(), foo(UNDEFINED), foo(0), foo(18), foo(18, UNDEFINED),    foo(18, 0), foo(0, 18), foo(UNDEFINED, UNDEFINED), foo(0, 0),    foo(18, 19), foo(UNDEFINED, 18) })->bar;   ]], ({ 34, 34, 0, 36, 36,    18, 18, 34, 0,    37, 35 }))    + dnl Multi-assign in function calls. + test_any([[ +  // Lifted from issue #10098. +  int add([int a, int b], int c) { return a + b + c; } +  return add(({ 1, 2 }), 3); + ]], 6) + test_equal([[ +  lambda(int a, [int b, int c, [int e, int f]], int d){ +  return ({ a, b, c, d, e, f }); +  }(1, ({ 3, 4, ({ 5, 6 }) }), 7); + ]], ({ 1, 3, 4, 7, 5, 6 })) + test_equal([[ +  lambda(int a, [int b, int c], int d){ +  return ({ a, b, c, d }); +  }(1, ({ 2, 3 }), 4); + ]], ({ 1, 2, 3, 4 })) + test_equal([[ +  lambda(int a, [int b, int c] = ({ 5, 6 }), int d = 10){ +  return ({ a, b, c, d }); +  }(1, ({ 2, 3 }), 4); + ]], ({ 1, 2, 3, 4 })) + test_equal([[ +  lambda(int a, [int b, int c] = ({ 5, 6 }), int d = 10){ +  return ({ a, b, c, d }); +  }(1, ({ 2, 3 })); + ]], ({ 1, 2, 3, 10 })) + test_equal([[ +  lambda(int a, [int b, int c] = ({ 5, 6 }), int d = 10){ +  return ({ a, b, c, d }); +  }(1); + ]], ({ 1, 5, 6, 10 })) +    dnl bug in for loop optimization in combination with +=   test_any([[   array v=({1,2,3});    for (int i=0; i<sizeof(v); i++)    for (int j=0; j<i; j++)    {    v+=({1+i});    if (i==17) { i=10000; break; }    }    return sizeof(v); // if buggy, will be 6 and not 140