Add the remaining comparisons for icmp.

This commit is contained in:
cfreksen 2017-10-29 19:00:10 +01:00
parent 636b1e5fa1
commit 599dcf5919
No known key found for this signature in database
GPG Key ID: EAC13EE101008978

View File

@ -155,6 +155,14 @@ def eval_icmp(cnd, left, right):
return left == right return left == right
elif cnd == 'ne': elif cnd == 'ne':
return left != right return left != right
elif cnd == 'slt':
return left < right
elif cnd == 'sle':
return left <= right
elif cnd == 'sgt':
return left > right
elif cnd == 'sge':
return left >= right
else: else:
err('eval_icmp: Unknown cnd: {}' err('eval_icmp: Unknown cnd: {}'
.format(cnd)) .format(cnd))