summaryrefslogtreecommitdiff
path: root/lib/a-path_test.c
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-07-13 14:14:37 +0200
committerMaria Matejka <mq@ucw.cz>2022-07-13 14:14:37 +0200
commit68a2c9d4c91a36c90a768926495f7894324287c5 (patch)
tree996387a4741746aa1c5cad1d238b886cfe7620d6 /lib/a-path_test.c
parentaf0d5ec2797bab2a928fa8ce2caf81608a3f7443 (diff)
parent2e5bfeb73ac25e236a24b6c1a88d0f2221ca303f (diff)
Merge commit '2e5bfeb73ac25e236a24b6c1a88d0f2221ca303f' into thread-next
Diffstat (limited to 'lib/a-path_test.c')
-rw-r--r--lib/a-path_test.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/a-path_test.c b/lib/a-path_test.c
index 38f77642..c6f8ce8b 100644
--- a/lib/a-path_test.c
+++ b/lib/a-path_test.c
@@ -12,6 +12,7 @@
#include "nest/rt.h"
#include "lib/attrs.h"
#include "lib/resource.h"
+#include "filter/data.h"
#define TESTS_NUM 30
#define AS_PATH_LENGTH 1000
@@ -127,8 +128,9 @@ t_path_include(void)
int counts_of_contains = count_asn_in_array(as_nums, as_nums[i]);
bt_assert_msg(as_path_contains(as_path, as_nums[i], counts_of_contains), "AS Path should contains %d-times number %d", counts_of_contains, as_nums[i]);
- bt_assert(as_path_filter(tmp_linpool, as_path, NULL, as_nums[i], 0) != NULL);
- bt_assert(as_path_filter(tmp_linpool, as_path, NULL, as_nums[i], 1) != NULL);
+ struct f_val v = { .type = T_INT, .val.i = as_nums[i] };
+ bt_assert(as_path_filter(tmp_linpool, as_path, &v, 0) != NULL);
+ bt_assert(as_path_filter(tmp_linpool, as_path, &v, 1) != NULL);
}
for (i = 0; i < 10000; i++)