summaryrefslogtreecommitdiff
path: root/filter/test.conf
diff options
context:
space:
mode:
Diffstat (limited to 'filter/test.conf')
-rw-r--r--filter/test.conf17
1 files changed, 17 insertions, 0 deletions
diff --git a/filter/test.conf b/filter/test.conf
index f61f0658..e8873fbf 100644
--- a/filter/test.conf
+++ b/filter/test.conf
@@ -27,6 +27,11 @@ function 'mkpair-a'(int a)
return (1, a);
}
+function mktrip(int a)
+{
+ return (a, 2*a, 3*a);
+}
+
function mkpath(int a; int b)
{
return [= a b 3 2 1 =];
@@ -89,6 +94,7 @@ clist l;
clist l2;
eclist el;
eclist el2;
+lclist ll;
{
print "Entering path test...";
pm1 = / 4 3 2 1 /;
@@ -203,6 +209,17 @@ eclist el2;
print "eclist A isect B: ", filter( el, el2 );
print "eclist A \ B: ", delete( el, el2 );
+ ll = --- empty ---;
+ ll = add(ll, (ten, 20, 30));
+ ll = add(ll, (1000, 2000, 3000));
+ ll = add(ll, mktrip(100000));
+ print "LC list (10, 20, 30) (1000, 2000, 3000) (100000, 200000, 300000):";
+ print ll;
+ print "LC len: ", el.len;
+ print "Should be true: ", mktrip(1000) ~ ll, " ", ll ~ [(5,10,15), (10,20,30)], " ", ll ~ [(10,15..25,*)], " ", ll ~ [(ten, *, *)];
+ print "Should be false: ", mktrip(100) ~ ll, " ", ll ~ [(5,10,15), (10,21,30)], " ", ll ~ [(10,21..25,*)], " ", ll ~ [(11, *, *)];
+ print "LC filtered: ", filter(ll, [(5..15, *, *), (100000, 500..500000, *)]);
+
# test_roa();
}