// this script was compiled with wurst 1.8.1.0-jenkins-Wurst-1366 globals integer test_bc=0 integer array Comparison_nextFree integer Comparison_firstFree=0 integer Comparison_maxIndex=0 integer array Comparison_typeId endglobals native testSuccess takes nothing returns nothing function initGlobals takes nothing returns nothing endfunction function booleanToIndex takes boolean b returns integer if b then return 1 endif return 0 endfunction function error takes string msg returns nothing call BJDebugMsg(msg + "\n" + "") endfunction function dispatch_Comparison_test_Comparison_leq takes integer this, integer t, integer u returns boolean local boolean b if Comparison_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling Comparison.leq") else call error("Called Comparison.leq on invalid object.") endif endif set b = u != 0 return t == 0 or b endfunction function new_BoolComp takes nothing returns integer local integer this if Comparison_firstFree == 0 then if Comparison_maxIndex < 32768 then set Comparison_maxIndex = Comparison_maxIndex + 1 set this = Comparison_maxIndex set Comparison_typeId[this] = 2 else call error("Out of memory: Could not create BoolComp.") set this = 0 endif else set Comparison_firstFree = Comparison_firstFree - 1 set this = Comparison_nextFree[Comparison_firstFree] set Comparison_typeId[this] = 2 endif return this endfunction function init_test takes nothing returns nothing set test_bc = new_BoolComp() if dispatch_Comparison_test_Comparison_leq(test_bc, booleanToIndex(false), booleanToIndex(true)) then call testSuccess() endif endfunction function main takes nothing returns nothing call initGlobals() call init_test() endfunction function config takes nothing returns nothing endfunction