# Executing another filter line. This replaces the recursion
# that was needed in the former implementation.
m4_define(LINEX, `FID_INTERPRET_EXEC()LINEX_($1)FID_INTERPRET_NEW()return $1 FID_INTERPRET_BODY()')
-m4_define(LINEX_, `do {
+m4_define(LINEX_, `do if ($1) {
fstk->estk[fstk->ecnt].pos = 0;
fstk->estk[fstk->ecnt].line = $1;
fstk->estk[fstk->ecnt].ventry = fstk->vcnt;
FID_ITERATE_BODY()m4_dnl
if (whati->fl$1) BUFFER_PUSH(fit->lines) = whati->fl$1;
FID_INTERPRET_EXEC()m4_dnl
-do { if (whati->fl$1) {
- LINEX_(whati->fl$1);
-} } while(0)
+LINEX_(whati->fl$1)
FID_INTERPRET_NEW()m4_dnl
return whati->f$1
FID_INTERPRET_BODY()')
bt_test_same(onef, oneg, 1);
bt_test_same(onef, twof, 0);
+/*
+ * Testing filter corner cases
+ * ---------------------------
+ */
+
+function t_nothing() {}
+bt_test_suite(t_nothing, "Testing nothing");
+
+function t_metanothing() { t_nothing(); }
+bt_test_suite(t_metanothing, "Testing meta nothing");
+
+
/*
* Testing boolean expressions
* ---------------------------
* ----------------
*/
+function aux_t_int(int t; int u)
+{
+ case t {
+ 1: {}
+ else: {}
+ }
+}
+
define four = 4;
define xyzzy = (120+10);
define '1a-a1' = (xyzzy-100);
else: bt_assert(false);
}
-
+ aux_t_int(1, 2);
+ aux_t_int(1, 3);
+ aux_t_int(2, 3);
+ aux_t_int(2, 2);
}
bt_test_suite(t_int, "Testing integers");