diff --git a/src/testsuite.in b/src/testsuite.in index 00f1c733dbfc147bc7e3ca2f005682792858787a..d315badf13186921d5578c36b88668d47aa57117 100644 --- a/src/testsuite.in +++ b/src/testsuite.in @@ -1,4 +1,4 @@ -stest_true([["$Id: testsuite.in,v 1.133 1998/11/09 07:23:18 hubbe Exp $"]]) +stest_true([["$Id: testsuite.in,v 1.134 1998/11/30 09:31:04 mast Exp $"]]) cond([[all_constants()->_verify_internals]], [[ test_do(_verify_internals()) @@ -2255,6 +2255,59 @@ test_equal(Array.diff("123.org"/"","http://123.org/"/""), ({ ({ ({}), "123.org"/"", ({}) }), ({ "http://"/"", "123.org"/"", ({ "/" }) }) })) +// - Array.diff3 (these tests do not work for a really optimal diff3 implementation) +test_equal(Array.diff3(({" "}),({"a"}),({"b"})), + ({({({" "})}), + ({({"a"})}), + ({({"b"})})})) +test_equal(Array.diff3(({}),({"a"}),({"b"})), + ({({({ })}), + ({({"a"})}), + ({({"b"})})})) +test_equal(Array.diff3(({}),({"a","c"}),({"b","y"})), + ({({({ })}), + ({({"a","c"})}), + ({({"b","y"})})})) +test_equal(Array.diff3(({"a"}),({"a","b"}),({"b"})), + ({({({"a"}),({ })}), + ({({"a"}),({"b"})}), + ({({ }),({"b"})})})) +test_equal(Array.diff3(({"a"}),({"a","c"}),({"b"})), + ({({({"a"}),({ })}), + ({({"a"}),({"c"})}), + ({({ }),({"b"})})})) +test_equal(Array.diff3(({"a","c","d"}),({"a","d","d"}),({"a","b"})), + ({({({"a"}),({"c"}),({"d"}),({ })}), + ({({"a"}),({ }),({"d"}),({"d"})}), + ({({"a"}),({"b"}),({ }),({ })})})) +test_equal(Array.diff3(({"a","d"}),({"a","d"}),({"a","b"})), + ({({({"a"}),({"d"})}), + ({({"a"}),({"d"})}), + ({({"a"}),({"b"})})})) +test_equal(Array.diff3(({"a","b"}),({"b","c"}),({"c","a"})), + ({({({"a"}),({"b"}),({ }),({ })}), + ({({ }),({"b"}),({"c"}),({ })}), + ({({ }),({ }),({"c"}),({"a"})})})) +test_equal(Array.diff3(({"a","b","c","d"}),({"x","x","x","d"}),({"a","y","y","y"})), + ({({({"a"}),({"b","c" }),({"d"})}), + ({({ }),({"x","x","x"}),({"d"})}), + ({({"a"}),({"y","y","y"}),({ })})})) +test_equal(Array.diff3(({"a","b","c","d"}),({"a","x","x","d"}),({"a","y","y","y"})), + ({({({"a"}),({"b","c" }),({"d"})}), + ({({"a"}),({"x","x" }),({"d"})}), + ({({"a"}),({"y","y","y"}),({ })})})) +test_equal(Array.diff3(({"a","b","c","d"}),({"x","x","x","b"}),({"a","y","y","y"})), + ({({({"a"}),({ }),({"b"}),({"c","d"})}), + ({({ }),({"x","x","x"}),({"b"}),({ })}), + ({({"a"}),({"y","y","y"}),({ }),({ })})})) +test_equal(Array.diff3(({"a","b","b","c","d"}),({"z","a","b","b","x"}),({"z","b","c","x"})), + ({({({ }),({"a"}),({"b"}),({"b"}),({"c"}),({"d"})}), + ({({"z"}),({"a"}),({"b"}),({"b"}),({ }),({"x"})}), + ({({"z"}),({ }),({"b"}),({ }),({"c"}),({"x"})})})) +test_equal(Array.diff3(({"a","b","c","d"}),({"b","a","c","c"}),({"b","b","d","d","a"})), + ({({({"a"}),({"b"}),({"c"}),({"d"}),({ }),({ }),({ })}), + ({({ }),({"b"}),({ }),({ }),({ }),({"a"}),({"c","c"})}), + ({({ }),({"b"}),({"b"}),({"d"}),({"d"}),({"a"}),({ })})})) // - equal // equal is already tested by this script