summaryrefslogtreecommitdiff
path: root/filter/filter.h
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2016-11-09 16:36:34 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2016-11-09 16:36:34 +0100
commit9b0a0ba9e671d9134b93c33ab73ccccb352acafa (patch)
tree2a3b007b698c02c72c7bae25d3c7cae6293cd36f /filter/filter.h
parent8860e991f6650e47cfe6c1af595fe4fe92a4edfd (diff)
Unit Testing for BIRD
- Unit Testing Framework (BirdTest) - Integration of BirdTest into the BIRD build system - Tests for several BIRD modules Based on squashed Pavel Tvrdik's int-test branch, updated for current int-new branch.
Diffstat (limited to 'filter/filter.h')
-rw-r--r--filter/filter.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/filter/filter.h b/filter/filter.h
index fc11b91e..a4808731 100644
--- a/filter/filter.h
+++ b/filter/filter.h
@@ -16,16 +16,16 @@
struct f_inst { /* Instruction */
struct f_inst *next; /* Structure is 16 bytes, anyway */
- u16 code;
- u16 aux;
+ u16 code; /* Instruction code, see the interpret() function and P() macro */
+ u16 aux; /* Extension to instruction code, T_*, EA_*, EAF_* */
union {
int i;
void *p;
- } a1;
+ } a1; /* The first argument */
union {
int i;
void *p;
- } a2;
+ } a2; /* The second argument */
int lineno;
};
@@ -55,7 +55,7 @@ struct f_prefix {
};
struct f_val {
- int type;
+ int type; /* T_* */
union {
uint i;
u64 ec;
@@ -205,4 +205,15 @@ struct f_trie
#define FF_FORCE_TMPATTR 1 /* Force all attributes to be temporary */
+/* Bird Tests */
+struct f_bt_test_suite {
+ node n; /* Node in config->tests */
+ struct f_inst *fn; /* Root of function */
+ const char *fn_name; /* Name of test */
+ const char *dsc; /* Description */
+};
+
+/* Hook for call bt_assert() function in configuration */
+extern void (*bt_assert_hook)(int result, struct f_inst *assert);
+
#endif