pike.git/
src/
testsuite.in
Branch:
Tag:
Non-build tags
All tags
No tags
1998-11-30
1998-11-30 09:31:04 by Martin Stjernholm <mast@lysator.liu.se>
89fb50df1eafb44f4fc13380a59fda8166a27fbf (
56
lines) (+
55
/-
1
)
[
Show
|
Annotate
]
Branch:
7.9
Added tests for diff3.
Rev: src/testsuite.in:1.134
1:
-
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:
({ ({ ({}), "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