// this script was compiled with wurst 1.8.1.0-jenkins-Wurst-1365 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 set Comparison_firstFree = 0 set Comparison_maxIndex = 0 endfunction function booleanToIndex takes boolean b returns integer if b then return 1 endif return 0 endfunction function Comparison_leq takes integer this, integer t, integer u returns boolean return true endfunction function error takes string msg returns nothing call BJDebugMsg(msg + "\n" + "") endfunction function BoolComp_leq takes integer this, boolean a, boolean b returns boolean return ( not a) or b endfunction function booleanFromIndex takes integer i returns boolean return i != 0 endfunction function test_BoolComp_leq_wrapper takes integer this, integer t, integer u returns boolean return BoolComp_leq(this, booleanFromIndex(t), booleanFromIndex(u)) endfunction function dispatch_Comparison_test_Comparison_leq takes integer this, integer t, integer u returns boolean local boolean test_Comparison_leq_result 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 = Comparison_leq(this, t, u) else set test_Comparison_leq_result = test_BoolComp_leq_wrapper(this, t, u) endif return test_Comparison_leq_result endfunction function alloc_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 BoolComp_init takes integer this returns nothing endfunction function Comparison_init takes integer this returns nothing endfunction function construct_Comparison takes integer this returns nothing call Comparison_init(this) endfunction function construct_BoolComp takes integer this returns nothing call construct_Comparison(this) call BoolComp_init(this) endfunction function new_BoolComp takes nothing returns integer local integer this = alloc_BoolComp() call construct_BoolComp(this) 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