aboutsummaryrefslogtreecommitdiffstats
path: root/filter/test.conf
diff options
context:
space:
mode:
Diffstat (limited to 'filter/test.conf')
-rw-r--r--filter/test.conf26
1 files changed, 13 insertions, 13 deletions
diff --git a/filter/test.conf b/filter/test.conf
index 90f5e694..62993898 100644
--- a/filter/test.conf
+++ b/filter/test.conf
@@ -21,17 +21,17 @@ attribute lclist mylclist;
define one = 1;
define ten = 10;
-function int onef(int a)
+function onef(int a) -> int
{
return 1;
}
-function int twof(int a)
+function twof(int a) -> int
{
return 2;
}
-function int oneg(int a)
+function oneg(int a) -> int
{
return 1;
}
@@ -274,7 +274,7 @@ bt_test_suite(t_bytestring, "Testing bytestrings");
* -------------
*/
-function pair 'mkpair-a'(int a)
+function 'mkpair-a'(int a) -> pair
{
return (1, a);
}
@@ -749,7 +749,7 @@ bt_test_suite(t_flowspec, "Testing flowspec routes");
* -------------
*/
-function bgpmask mkpath(int a; int b)
+function mkpath(int a; int b) -> bgpmask
{
return [= a b 3 2 1 =];
}
@@ -1432,7 +1432,7 @@ bt_test_suite(t_ec_set, "Testing sets of extended communities");
* -------------------------
*/
-function lc mktrip(int a)
+function mktrip(int a) -> lc
{
return (a, 2*a, 3*a);
}
@@ -1747,7 +1747,7 @@ bt_test_suite(t_define, "Testing defined() function");
* -------------------------
*/
-function int callme(int arg1; int arg2)
+function callme(int arg1; int arg2) -> int
int i;
{
case arg1 {
@@ -1758,12 +1758,12 @@ int i;
return 0;
}
-function int callmeagain(int a; int b; int c)
+function callmeagain(int a; int b; int c) -> int
{
return a + b + c;
}
-function int fifteen()
+function fifteen() -> int
{
return 15;
}
@@ -1796,28 +1796,28 @@ function local_vars(int j)
bt_assert(j = 35 && k = 20 && m = 100);
}
-function int factorial(int x)
+function factorial(int x) -> int
{
if x = 0 then return 0;
if x = 1 then return 1;
else return x * factorial(x - 1);
}
-function int fibonacci(int x)
+function fibonacci(int x) -> int
{
if x = 0 then return 0;
if x = 1 then return 1;
else return fibonacci(x - 1) + fibonacci(x - 2);
}
-function bgppath hanoi_init(int a; int b)
+function hanoi_init(int a; int b) -> bgppath
{
if b = 0
then return +empty+;
else return prepend(hanoi_init(a + 1, b - 1), a);
}
-function bgppath hanoi_solve(int n; bgppath h_src; bgppath h_dst; bgppath h_aux; bool x; bool y)
+function hanoi_solve(int n; bgppath h_src; bgppath h_dst; bgppath h_aux; bool x; bool y) -> bgppath
{
# x -> return src or dst
# y -> print state