// this script was compiled with wurst 1.8.1.0-jenkins-Wurst-1367 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 this if Bla_firstFree == 0 then if Bla_maxIndex < 32768 then set Bla_maxIndex = Bla_maxIndex + 1 set this = Bla_maxIndex set Bla_typeId[this] = 1 else call error("Out of memory: Could not create Bla.") set this = 0 endif else set Bla_firstFree = Bla_firstFree - 1 set this = Bla_nextFree[Bla_firstFree] set Bla_typeId[this] = 1 endif set Bla_i[this] = 13 set Bla_j[this] = 27 set Bla_j[this] = 14 if Bla_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling Bla.getI") else call error("Called Bla.getI on invalid object.") endif endif if Bla_i[this] != 13 then call testFail("i") else if Bla_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling Bla.getJ") else call error("Called Bla.getJ on invalid object.") endif endif if Bla_j[this] != 14 then call testFail("j") else if Bla_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling Bla.getK") else call error("Called Bla.getK on invalid object.") endif endif call testSuccess() endif endif endfunction function main takes nothing returns nothing call initGlobals() call init_test() endfunction function config takes nothing returns nothing endfunction