diff options
author | Pavel Tvrdik <pawel.tvrdik@gmail.com> | 2016-11-30 10:40:57 +0100 |
---|---|---|
committer | Pavel Tvrdik <pawel.tvrdik@gmail.com> | 2016-11-30 11:57:35 +0100 |
commit | 5df4073c81942ea119de90a81431bae71c87157b (patch) | |
tree | ab5b4ff20708cdad088aa218d6cb7e558a8db3ac /filter | |
parent | 0eb7f17d9a5f29ffa8edccf9e2698f3fd70b2f22 (diff) |
filter/test.conf: Minor changes in order of calls
Diffstat (limited to 'filter')
-rw-r--r-- | filter/test.conf | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/filter/test.conf b/filter/test.conf index 078dafb9..16ef7a86 100644 --- a/filter/test.conf +++ b/filter/test.conf @@ -365,8 +365,8 @@ bt_test_suite(t_ip_set, "Testing sets of ip address"); function t_enum() { - bt_assert(format(RTS_DUMMY) = "(enum 30)0"); /* XXX */ - bt_assert(format(RTS_STATIC) = "(enum 30)1"); /* XXX */ + bt_assert(format(RTS_DUMMY) = "(enum 30)0"); + bt_assert(format(RTS_STATIC) = "(enum 30)1"); bt_assert(RTS_STATIC ~ [RTS_STATIC, RTS_DEVICE]); bt_assert(RTS_BGP !~ [RTS_STATIC, RTS_DEVICE]); } @@ -699,31 +699,32 @@ clist r; l2 = filter(l2, [(3,3..6)]); # clist A (10,20,30) - bt_assert(format(l) = "(clist (3,1) (3,2) (3,3) (3,4))"); bt_assert(l = add(add(add(add(-empty-, (3,1)), (3,2)), (3,3)), (3,4))); + bt_assert(format(l) = "(clist (3,1) (3,2) (3,3) (3,4))"); # clist B (30,40,50) - bt_assert(format(l2) = "(clist (3,3) (3,4) (3,5) (3,6))"); bt_assert(l2 = add(add(add(add(-empty-, (3,3)), (3,4)), (3,5)), (3,6))); + bt_assert(format(l2) = "(clist (3,3) (3,4) (3,5) (3,6))"); # clist A union B r = add(l, l2); - bt_assert(format(r) = "(clist (3,1) (3,2) (3,3) (3,4) (3,5) (3,6))"); bt_assert(r = add(add(add(add(add(add(-empty-, (3,1)), (3,2)), (3,3)), (3,4)), (3,5)), (3,6))); + bt_assert(format(r) = "(clist (3,1) (3,2) (3,3) (3,4) (3,5) (3,6))"); # clist A isect B r = filter(l, l2); - bt_assert(format(r) = "(clist (3,3) (3,4))"); bt_assert(r = add(add(-empty-, (3,3)), (3,4))); + bt_assert(format(r) = "(clist (3,3) (3,4))"); # clist A \ B r = delete(l, l2); - bt_assert(format(r) = "(clist (3,1) (3,2))"); bt_assert(r = add(add(-empty-, (3,1)), (3,2))); + bt_assert(format(r) = "(clist (3,1) (3,2))"); # clist in c set r = filter(l, [(3,1), (*,2)]); bt_assert(r = add(add(-empty-, (3,1)), (3,2))); + bt_assert(format(r) = "(clist (3,1) (3,2))"); } bt_test_suite(t_clist, "Testing lists of communities"); @@ -803,31 +804,32 @@ eclist r; el2 = add(el2, (rt, 10, 50)); # eclist A (1,30,40) - bt_assert(format(el) = "(eclist (rt, 10, 1) (rt, 10, 30) (rt, 10, 40))"); bt_assert(el = add(add(add(--empty--, (rt, 10, 1)), (rt, 10, 30)), (rt, 10, 40))); + bt_assert(format(el) = "(eclist (rt, 10, 1) (rt, 10, 30) (rt, 10, 40))"); # eclist B (30,40,50) - bt_assert(format(el2) = "(eclist (rt, 10, 30) (rt, 10, 40) (rt, 10, 50))"); bt_assert(el2 = add(add(add(--empty--, (rt, 10, 30)), (rt, 10, 40)), (rt, 10, 50))); + bt_assert(format(el2) = "(eclist (rt, 10, 30) (rt, 10, 40) (rt, 10, 50))"); # eclist A union B r = add(el2, el); - bt_assert(format(r) = "(eclist (rt, 10, 30) (rt, 10, 40) (rt, 10, 50) (rt, 10, 1))"); bt_assert(r = add(add(add(add(--empty--, (rt, 10, 30)), (rt, 10, 40)), (rt, 10, 50)), (rt, 10, 1))); + bt_assert(format(r) = "(eclist (rt, 10, 30) (rt, 10, 40) (rt, 10, 50) (rt, 10, 1))"); # eclist A isect B r = filter(el, el2); - bt_assert(format(r) = "(eclist (rt, 10, 30) (rt, 10, 40))"); bt_assert(r = add(add(--empty--, (rt, 10, 30)), (rt, 10, 40))); + bt_assert(format(r) = "(eclist (rt, 10, 30) (rt, 10, 40))"); # eclist A \ B r = delete(el, el2); - bt_assert(format(r) = "(eclist (rt, 10, 1))"); bt_assert(r = add(--empty--, (rt, 10, 1))); + bt_assert(format(r) = "(eclist (rt, 10, 1))"); # eclist in ec set r = filter(el, [(rt, 10, 1), (rt, 10, 25..30), (ro, 10, 40)]); bt_assert(r = add(add(--empty--, (rt, 10, 1)), (rt, 10, 30))); + bt_assert(format(r) = "(eclist (rt, 10, 1) (rt, 10, 30))"); } bt_test_suite(t_eclist, "Testing lists of extended communities"); @@ -916,22 +918,23 @@ lclist r; # lclist A union B r = add(ll, ll2); - bt_assert(format(r) = "(lclist (10, 10, 10) (20, 20, 20) (30, 30, 30) (40, 40, 40))"); bt_assert(r = add(add(add(add(---empty---, (10,10,10)), (20,20,20)), (30,30,30)), (40,40,40))); + bt_assert(format(r) = "(lclist (10, 10, 10) (20, 20, 20) (30, 30, 30) (40, 40, 40))"); # lclist A isect B r = filter(ll, ll2); - bt_assert(format(r) = "(lclist (20, 20, 20) (30, 30, 30))"); bt_assert(r = add(add(---empty---, (20, 20, 20)), (30, 30, 30))); + bt_assert(format(r) = "(lclist (20, 20, 20) (30, 30, 30))"); # lclist A \ B r = delete(ll, ll2); - bt_assert(format(r) = "(lclist (10, 10, 10))"); bt_assert(r = add(---empty---, (10, 10, 10))); + bt_assert(format(r) = "(lclist (10, 10, 10))"); # lclist in lc set r = filter(ll, [(5..15, *, *), (20, 15..25, *)]); bt_assert(r = add(add(---empty---, (10, 10, 10)), (20, 20, 20))); + bt_assert(format(r) = "(lclist (10, 10, 10) (20, 20, 20))"); } bt_test_suite(t_lclist, "Testing lists of large communities"); @@ -962,6 +965,7 @@ lc set lls; bt_assert(ll !~ [(11, *, *)]); lls = [(10, 10, 10), (20, 20, 15..25), (30, 30, *), (40, 35..45, *), (50, *, *), (55..65, *, *)]; + bt_assert(format(lls) = "[(10, 10, 10), (20, 20, 15)..(20, 20, 25), (30, 30, 0)..(30, 30, 4294967295), (40, 35, 0)..(40, 45, 4294967295), (50, 0, 0)..(50, 4294967295, 4294967295), (55, 0, 0)..(65, 4294967295, 4294967295)]"); bt_assert((10, 10, 10) ~ lls); bt_assert((20, 20, 25) ~ lls); bt_assert((20, 20, 26) !~ lls); |