pike.git / lib / modules / testsuite.in

version» Context lines:

pike.git/lib/modules/testsuite.in:845:    Array.Iterator i = get_iterator (a);    foreach (i;; int v)    if (v > 3) break;    foreach (i;; int v)    if (v < 5) break;    foreach (i;; int v)    return v;   ]], 4)   test_eq( sizeof(Array.Iterator(({1,2,3,4}))), 4 )    + test_do(add_constant("random",Random.Deterministic(17)->random)) + test_any_equal([[ +  string r = ""; +  for(int i; i<4; i++) +  foreach(random(Array.Iterator("12345678"/1));; string v) +  r += v; +  return r; + ]], "7883456785678") + test_do(add_constant("random",Random.System()->random)) +    dnl - Colors      define(test_rgb,[[    test_equal(Colors.$1($2),({$3}))    test_equal(Colors.$1(({$2})),({$3}))   ]])      test_rgb(rgb_to_hsv,[[0,0,0]],[[0,0,0]])   test_rgb(rgb_to_hsv,[[255,255,255]],[[0,0,255]])   test_rgb(rgb_to_hsv,[[17,42,112]],[[159,216,112]])
pike.git/lib/modules/testsuite.in:1191:   test_eq( sizeof(Mapping.Iterator(([1:2,3:4]))), 2 )      test_do([[    // Test for [bug 5085].    for (int i=0; i < 100; i++) {    // The following line trigged the bug 33% of the time.    get_iterator(([1:1]))->_random(random_string, random);    }   ]])    + test_do(add_constant("random",Random.Deterministic(17)->random)) + test_any_equal([[ +  string r = ""; +  for(int i; i<5; i++) +  foreach(random(Mapping.Iterator(([1:"1",2:"2",3:"3"])));; string v) +  r += v; +  return r; + ]], "233323123") + test_do(add_constant("random",Random.System()->random)) +    dnl - Multiset      test_eq( sizeof(Multiset.Iterator((<1,2,3>))), 3 )    -  + test_do(add_constant("random",Random.Deterministic(17)->random)) + test_any_equal([[ +  string r = ""; +  for(int i; i<5; i++) +  foreach(random(Multiset.Iterator((<2,4,6,8,9>))); int v;) +  r += v; +  return r; + ]], "689946894689689") + test_do(add_constant("random",Random.System()->random)) +    dnl - Process   test_equal([[Process.split_quoted_string("test ")]],[[({"test"})]])   test_equal([[Process.split_quoted_string("'test'")]],[[({"test"})]])   test_equal([[Process.split_quoted_string("foo 'test' bar")]],[[({"foo","test","bar"})]])   test_equal([[Process.split_quoted_string ("\\\"")]],    [[({"\""})]])   test_equal([[Process.split_quoted_string ("\\a")]],    [[({"a"})]])   test_equal([[Process.split_quoted_string ("\\ ")]],    [[({" "})]])