0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-08 12:18:42 +00:00

Missing boolean comparison added.

This commit is contained in:
Ondrej Filip 2009-05-28 13:37:04 +02:00
parent 4c2507da68
commit a6c9f0648d
2 changed files with 6 additions and 2 deletions

View File

@ -120,7 +120,8 @@ val_compare(struct f_val v1, struct f_val v2)
}
switch (v1.type) {
case T_ENUM:
case T_INT:
case T_INT:
case T_BOOL:
case T_PAIR:
if (v1.val.i == v2.val.i) return 0;
if (v1.val.i < v2.val.i) return -1;

View File

@ -155,6 +155,9 @@ string s;
b = true;
print "Testing bool: ", b, ", ", !b;
if ( b = true ) then print "Testing bool comparison b = true: ", b;
else { print "*** FAIL: TRUE test failed" ; quitbird; }
pxs = [ 1.2.0.0/16, 1.4.0.0/16+];
print "Testing prefix sets: ";
@ -202,4 +205,4 @@ int j;
accept "ok I take that";
}
eval __startup();
eval __startup();