Branch: Tag:

2002-10-16

2002-10-16 00:00:07 by Martin Nilsson <mani@lysator.liu.se>

Some more tests, mostly border tests.

Rev: lib/modules/testsuite.in:1.4

1: - dnl $Id: testsuite.in,v 1.3 2002/10/14 16:09:43 jhs Exp $ + dnl $Id: testsuite.in,v 1.4 2002/10/16 00:00:07 nilsson Exp $      dnl - Array   
21:    ({ "0", "3", "6", "9"}))   test_equal(Array.everynth("0123456789"/"",3,4),    ({ "4", "7"})) + test_equal(Array.everynth(({})),({}))      test_equal(Array.splice(({7,8,99}),({"h","h",99})),    ({7,"h",8,"h",99,99}))
44:    ({1,2,3,4}))   test_equal(Array.uniq( ({ "a",5,1.0,5,"b","a" }) ),    ({"a",5,1.0,"b"})) + test_equal(Array.uniq( ({}) ), ({}))      test_equal(Array.filter( ({ 1,2,3,4,5,6, }), lambda(int i) { return 0; } ),    ({}))
51:    ({1,2,3,4,5,6}))   test_equal(Array.filter( ({ 1,2,3,4,5,6, }), lambda(int i) { return i%2; } ),    ({1,3,5})) + test_equal([[ Array.filter( ({}), lambda(int i) { return 1; })]], ({}))      test_equal(Array.permute( ({ 1,2 }), 0 ),    ({ 1,2 }))
58:    ({ 2,1 }))   test_equal(Array.permute( ({ 1,2,3,4,5,6,7,8,9,10 }), 3628800),    ({ 1,2,3,4,5,6,7,8,9,10 })) + test_equal(Array.permute( ({}), 1 ), ({}))    -  + test_equal(Array.enumerate(0), ({})) + test_equal(Array.enumerate(1), ({ 0 }))   test_equal(Array.enumerate(5), ({ 0,1,2,3,4 }))   test_equal(Array.enumerate(5,2), ({ 0,2,4,6,8 }))   test_equal(Array.enumerate(5,2,7), ({ 7,9,11,13,15 }))
72:   test_eq([[ Array.rreduce(`==, ({}), 1) ]], 1)   test_eq([[ Array.rreduce(`<<, ({4,3,2,1})) ]], 1125899906842624)    + test_equal(Array.shuffle(({})), ({})) + test_equal(Array.shuffle(({1})), ({1}))   test_any([[    random_seed(4711);    array b = Array.shuffle(Array.enumerate(1000));
86:   dnl Array.search_array   dnl Array.sum_arrays    + test_equal(Array.sort_array(({})), ({}))   test_equal([[ Array.sort_array(enumerate(9), `<) ]], [[ enumerate(9,-1,8) ]])      dnl Array.columns
96:   dnl Array.lyskom_sort_func   dnl Array.flatten    + test_eq(Array.sum(({})),0)   test_eq(Array.sum((array(int))"157"), 157)   test_eq([[ Array.sum(enumerate(12345)) ]],    [[ Array.reduce(`+, enumerate(12345)) ]]) -  + test_eq(Array.sum( "abcdefgh"/2.5 ), "abcdefgh") + test_equal([[ Array.sum( ({ ({ 1,2,3 }), ({ 4,5 }) }) )]],[[ ({ 1,2,3,4,5 }) ]])    -  + test_equal(Array.uniq2(({})), ({}))   test_equal([[ Array.uniq2("AAAAAAAAAAAHHHHAAA!!!!"/1)*"" ]], [[ "AHA!" ]])      test_equal([[ Array.arrayify( ({1,2,3}) ) ]],[[ ({1,2,3}) ]])
110:   dnl Array.oid_sort_func   dnl Array.greedy_diff    + test_equal( Array.count(({})), ([]) )   test_eq( Array.count((multiset)("All your Pike are belong to us!"/1), " "), 6 )   test_eq( Array.count("...and there was much rejoicing."/1, "."), 4 )   test_eq([[Array.count((["An":"eye", "for":4, "an":"eye"]), "eye")]], 2 )