feat(Evaluator): add strict comparaison operators

This commit is contained in:
Matthieu Bessat 2022-05-15 20:49:23 +02:00
parent 35ca9c31ea
commit b72448c62d
4 changed files with 25 additions and 2 deletions

View file

@ -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);
}