feat(Evaluator): add strict comparaison operators
This commit is contained in:
parent
35ca9c31ea
commit
b72448c62d
4 changed files with 25 additions and 2 deletions
|
|
@ -121,4 +121,16 @@ void test_evaluation()
|
|||
evaluate(state, "1 & (1 | 0)", &resVal, &resType);
|
||||
assert(resType == TYPE_INT);
|
||||
assert(1 == resVal);
|
||||
|
||||
evaluate(state, "0 > 0", &resVal, &resType);
|
||||
assert(resType == TYPE_INT);
|
||||
assert(0 == resVal);
|
||||
|
||||
evaluate(state, "-45 < 1", &resVal, &resType);
|
||||
assert(resType == TYPE_INT);
|
||||
assert(1 == resVal);
|
||||
|
||||
evaluate(state, "5 > 0", &resVal, &resType);
|
||||
assert(resType == TYPE_INT);
|
||||
assert(1 == resVal);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue