Branch: Tag:

2003-04-29

2003-04-29 00:11:18 by Martin Nilsson <mani@lysator.liu.se>

More tests

Rev: lib/modules/testsuite.in:1.15

1: - dnl $Id: testsuite.in,v 1.14 2003/02/26 19:43:03 mast Exp $ + dnl $Id: testsuite.in,v 1.15 2003/04/29 00:11:18 nilsson Exp $      dnl - Array   
25:    ({ ({ ({}), "123.org"/"", ({}) }),    ({ "http://"/"", "123.org"/"", ({ "/" }) }) }))    + dnl Array.diff_compare_table +    test_equal(Array.longest_ordered_sequence("dfgaok√§pojghadjjioijrgxcvb"/""),    ({ 0, 1, 2, 10, 11, 16, 18, 19, 20, 22 }));    - dnl Array.diff_compare_table - dnl Array.longest_ordered_sequence +    dnl Array.interleave_array   dnl Array.sort   
84:    ({ 1,2 }))   test_equal(Array.permute( ({ 1,2 }), 1 ),    ({ 2,1 })) + test_equal(Array.permute( ({ 1,2 }), 2 ), +  ({ 1,2 }))   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 ), ({}))
117:   test_true( equal(Array.enumerate(1000),sort(Array.shuffle(Array.enumerate(1000)))) )      dnl Array.search_array - dnl Array.sum_arrays +     -  + test_equal( Array.sum_arrays( `+, ({}) ), ({}) ) + test_equal( Array.sum_arrays( `+, enumerate(5), enumerate(5)), ({0,2,4,6,8}) ) +    test_equal(Array.sort_array(({})), ({}))   test_equal([[ Array.sort_array(enumerate(9), `<) ]], [[ enumerate(9,-1,8) ]])   
267:      dnl Array.diff3_old    - test_eq(Array.dwim_sort_func("1","a"), -1) - test_eq(Array.dwim_sort_func("1","1a"), -1) - test_eq(Array.dwim_sort_func("1","0a"), 1) + define(test_sort,[[ +  test_eq(Array.$1($2,$3), -1) +  test_eq(Array.$1($3,$2), 1) + ]]) +  + test_false(Array.dwim_sort_func("","")) + test_sort(dwim_sort_func,"1","a") + test_sort(dwim_sort_func,"1","1a") + test_sort(dwim_sort_func,"0a","1") + test_sort(dwim_sort_func,"1","2") + test_sort(dwim_sort_func,"2a","10")   test_eq(Array.dwim_sort_func("1","1"), 0)   test_eq(Array.dwim_sort_func("1","01"), 0) - test_eq(Array.dwim_sort_func("1","2"), -1) - test_eq(Array.dwim_sort_func("10","2a"), 1) +     -  + test_false(Array.lyskom_sort_func("","")) + test_sort(lyskom_sort_func,"a","b") + test_false(Array.lyskom_sort_func("a","a")) + test_false(Array.lyskom_sort_func("Foo (bar)","foo (really!)")) +    dnl Array.lyskom_sort_func - dnl Array.flatten +     -  + test_eq( Array.flatten( ({}) ), ({}) ) + test_equal( Array.flatten( ({1,({2,({3,({4}),({}),5})}),({({}),({6})})})), +  ({1,2,3,4,5,6}) ) + test_equal( Array.flatten( ({ 1,({2,3}),4,({2,3}),5 }) ), ({1,2,3,4,2,3,5}) ) + test_any_equal([[ +  array a=({1,2,3}); +  a[1]=a; +  return Array.flatten(a); + ]], ({1,3})) + test_any_equal([[ +  array a=({1,({2,3}),({4,5}),({2,3})}); +  a[2][1]=a; +  return Array.flatten(a); + ]], ({1,2,3,4,2,3})) +    test_eq(Array.sum(({})),0)   test_eq(Array.sum((array(int))"157"), 157)   test_eq([[ Array.sum(enumerate(12345)) ]],
610:   test_do( add_constant("getopt_env"); )   test_do( add_constant("opt"); )    + dnl - Int +  + test_eq( Int.parity(0), 0 ) + test_eq( Int.parity(1), 1 ) + test_eq( Int.parity(2), 1 ) + test_eq( Int.parity(3), 0 ) + test_eq( Int.parity(4), 1 ) + test_eq( Int.parity(6), 0 ) + test_eq( Int.parity(7), 1 ) +    dnl - Mapping   dnl Mapping.delete   dnl Mapping.Iterator      dnl - Multiset   dnl Multiset.Iterator