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) { switch (v1.type) {
case T_ENUM: case T_ENUM:
case T_INT: case T_INT:
case T_BOOL:
case T_PAIR: case T_PAIR:
if (v1.val.i == v2.val.i) return 0; if (v1.val.i == v2.val.i) return 0;
if (v1.val.i < v2.val.i) return -1; if (v1.val.i < v2.val.i) return -1;

View file

@ -155,6 +155,9 @@ string s;
b = true; b = true;
print "Testing bool: ", b, ", ", !b; 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+]; pxs = [ 1.2.0.0/16, 1.4.0.0/16+];
print "Testing prefix sets: "; print "Testing prefix sets: ";
@ -202,4 +205,4 @@ int j;
accept "ok I take that"; accept "ok I take that";
} }
eval __startup(); eval __startup();