backend: add tests for ===

This commit is contained in:
Svyatoslav Scherbina
2016-11-17 11:42:02 +07:00
committed by SvyatoslavScherbina
parent 5db25a3985
commit 69ee5a619a
2 changed files with 7 additions and 0 deletions
@@ -13,6 +13,8 @@ run_test() {
void *(*goodbyeString)() = resolve_symbol("kfun:goodbyeString()");
int (*eqeqStr)(void *, void *) = resolve_symbol("kfun:eqeqStr(String;String)");
int (*eqeqeq)(void *, void *) = resolve_symbol("kfun:eqeqeq(Any?;Any?)");
int (*gtI )(int , int ) = resolve_symbol("kfun:gtI(Int;Int)");
int (*ltI )(int , int ) = resolve_symbol("kfun:ltI(Int;Int)");
int (*geI )(int , int ) = resolve_symbol("kfun:geI(Int;Int)");
@@ -34,6 +36,9 @@ run_test() {
if (!eqeqStr(helloString(), helloString())) return 1;
if (!eqeqeq(helloString(), helloString())) return 1;
if (eqeqeq(helloString(), goodbyeString())) return 1;
if (gtI (2 , 3 )) return 1;
if (ltI (3 , 2 )) return 1;
if (geI (2 , 3 )) return 1;