// this script was compiled with wurst 1.8.1.0-jenkins-Wurst-1366 globals integer array Bla_nextFree integer Bla_firstFree=0 integer Bla_maxIndex=0 integer array Bla_typeId integer array Bla_i integer array Bla_j endglobals native testFail takes string msg returns nothing native testSuccess takes nothing returns nothing function initGlobals takes nothing returns nothing endfunction function error takes string msg returns nothing call BJDebugMsg(msg + "\n" + "") endfunction function init_test takes nothing returns nothing local integer j = 14 local integer b local integer this local integer this_1 local integer this_2 local integer j_1 local integer this_3 local integer this_4 local integer test_Bla_getI_result local integer this_5 local integer this_6 local integer test_Bla_getJ_result local integer this_7 local integer this_8 local integer test_Bla_getK_result if Bla_firstFree == 0 then if Bla_maxIndex < 32768 then set Bla_maxIndex = Bla_maxIndex + 1 set this_1 = Bla_maxIndex set Bla_typeId[this_1] = 1 else call error("Out of memory: Could not create Bla.") set this_1 = 0 endif else set Bla_firstFree = Bla_firstFree - 1 set this_1 = Bla_nextFree[Bla_firstFree] set Bla_typeId[this_1] = 1 endif set this = this_1 set this_2 = this set j_1 = j set this_3 = this_2 set Bla_i[this_3] = 13 set Bla_j[this_3] = 27 set Bla_j[this_2] = j_1 set b = this set this_4 = b if Bla_typeId[this_4] == 0 then if this_4 == 0 then call error("Nullpointer exception when calling Bla.getI") else call error("Called Bla.getI on invalid object.") endif endif set this_5 = this_4 set test_Bla_getI_result = Bla_i[this_5] if test_Bla_getI_result != 13 then call testFail("i") else set this_6 = b if Bla_typeId[this_6] == 0 then if this_6 == 0 then call error("Nullpointer exception when calling Bla.getJ") else call error("Called Bla.getJ on invalid object.") endif endif set this_7 = this_6 set test_Bla_getJ_result = Bla_j[this_7] if test_Bla_getJ_result != 14 then call testFail("j") else set this_8 = b if Bla_typeId[this_8] == 0 then if this_8 == 0 then call error("Nullpointer exception when calling Bla.getK") else call error("Called Bla.getK on invalid object.") endif endif set test_Bla_getK_result = 36 if test_Bla_getK_result != 36 then call testFail("k") else call testSuccess() endif endif endif endfunction function main takes nothing returns nothing call initGlobals() call init_test() endfunction function config takes nothing returns nothing endfunction