Branch: Tag:

1998-02-24

1998-02-24 17:30:54 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Added tests for Array.diff() and Array.longest_ordered_sequence().

Rev: src/testsuite.in:1.73

1: - test_true([["$Id: testsuite.in,v 1.72 1998/02/11 00:56:20 grubba Exp $"]]) + test_true([["$Id: testsuite.in,v 1.73 1998/02/24 17:30:54 grubba Exp $"]])   test_eq(1e1,10.0)   test_eq(1E1,10.0)   test_eq(1e+1,10.0)
1574:   dnl test_any([[object t; mapping o=([t=clone(PROG):"foo"]); destruct(t); return sizeof(o)]],0);   test_do([[object t,*o=({}); o+=({t=clone(PROG)}); destruct(t); o=({});]]);    + // - Array.diff + test_equal(Array.diff(({ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }), +  ({ 6, 7, 8, 9, 3, 4, 5, 1, 2, 0 })), +  ({ ({ ({ 0, 1, 2, 3, 4, 5 }), +  ({ 6, 7, 8, 9 }), ({}) }), +  ({ ({}), ({ 6, 7, 8, 9 }), +  ({ 3, 4, 5, 1, 2, 0 }) }) })) + test_equal(Array.diff(({ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }), +  ({ 9, 7, 8, 4, 5, 6, 0, 1, 2, 3 })), +  ({ ({ ({}), ({ 0, 1, 2, 3 }), +  ({ 4, 5, 6, 7, 8, 9 }) }), +  ({ ({ 9, 7, 8, 4, 5, 6 }), +  ({ 0, 1, 2, 3 }), ({}) }) })) + test_equal(Array.diff("qadfgoksdfäojerjgöohjgdgkm"/"", +  "xadfgokälojeorjgöoyjgdgkmzzz"/""), +  ({ ({ ({ "q" }), "adfgok"/"", "sdf"/"", ({ "ä" }), ({}), +  "oje"/"", ({}), "rjgöo"/"", ({ "h" }), "jgdgkm"/"", ({}) }), +  ({ ({ "x" }), "adfgok"/"", ({}), ({ "ä" }), ({ "l" }), +  "oje"/"", ({ "o" }), "rjgöo"/"", ({ "y" }), "jgdgkm"/"", +  "zzz"/"" }) })) +  +    // - equal - // equl is already tested by this script + // equal is already tested by this script      // - exit   // FIXME put test for exit here
1623:   test_equal(Array.sort_array(indices((<7,8,99>))),({7,8,99}))   test_equal(mkmultiset(indices(this_object())),(<"a","b">))    + // - Array.longest_ordered_sequence + test_equal(Array.longest_ordered_sequence("dfgaokäpojghadjjioijrgxcvb"/""), +  ({ 0, 1, 2, 10, 11, 16, 18, 19, 20, 22 })); +    // - lower_case   test_equal(lower_case("foo"),"foo")   test_equal(lower_case("Foo"),"foo")