// 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 test_Comparison_leq_result local integer t_1 local integer u_1 local boolean a local boolean b local integer i local integer i_1 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 if Comparison_typeId[this] <= 1 then set test_Comparison_leq_result = true else set t_1 = t set u_1 = u set i = t_1 set a = i != 0 set i_1 = u_1 set b = i_1 != 0 set test_Comparison_leq_result = ( not a) or b endif return test_Comparison_leq_result endfunction function new_BoolComp takes nothing returns integer local integer this local integer this_1 if Comparison_firstFree == 0 then if Comparison_maxIndex < 32768 then set Comparison_maxIndex = Comparison_maxIndex + 1 set this_1 = Comparison_maxIndex set Comparison_typeId[this_1] = 2 else call error("Out of memory: Could not create BoolComp.") set this_1 = 0 endif else set Comparison_firstFree = Comparison_firstFree - 1 set this_1 = Comparison_nextFree[Comparison_firstFree] set Comparison_typeId[this_1] = 2 endif set this = this_1 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