// 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 integer wurst_stack_depth=0 string array wurst_stack 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, string w__wurst_stackPos returns nothing local integer stacktraceIndex local integer stacktraceLimit set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set w__wurst_stackPos = "" set stacktraceIndex = wurst_stack_depth set stacktraceLimit = 0 loop set stacktraceIndex = stacktraceIndex - 1 set stacktraceLimit = stacktraceLimit + 1 exitwhen stacktraceLimit > 20 or stacktraceIndex < 0 set w__wurst_stackPos = w__wurst_stackPos + "\n " + wurst_stack[stacktraceIndex] endloop call BJDebugMsg(msg + "\n" + w__wurst_stackPos) set wurst_stack_depth = wurst_stack_depth - 1 endfunction function new_Bla takes integer j, string w__wurst_stackPos returns integer local integer this set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling alloc_Bla in Classes_construct.wurst, line 12" set wurst_stack_depth = wurst_stack_depth + 1 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.", "when calling error in Classes_construct.wurst, line 7") set this = 0 endif else set Bla_firstFree = Bla_firstFree - 1 set this = Bla_nextFree[Bla_firstFree] set Bla_typeId[this] = 1 endif set wurst_stack_depth = wurst_stack_depth - 1 set Bla_i[this] = 13 set Bla_j[this] = 27 set Bla_j[this] = j set wurst_stack_depth = wurst_stack_depth - 1 return this endfunction function init_test takes string w__wurst_stackPos returns nothing local integer b local integer test_Bla_getJ_result set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set b = new_Bla(14, "when calling new_Bla in Classes_construct.wurst, line 31") set wurst_stack[wurst_stack_depth] = "when calling getI in Classes_construct.wurst, line 32" set wurst_stack_depth = wurst_stack_depth + 1 if Bla_typeId[b] == 0 then if b == 0 then call error("Nullpointer exception when calling Bla.getI", "when calling error in Classes_construct.wurst, line 16") else call error("Called Bla.getI on invalid object.", "when calling error in Classes_construct.wurst, line 16") endif endif set test_Bla_getJ_result = Bla_i[b] set wurst_stack_depth = wurst_stack_depth - 1 if test_Bla_getJ_result != 13 then call testFail("i") else set wurst_stack[wurst_stack_depth] = "when calling getJ in Classes_construct.wurst, line 34" set wurst_stack_depth = wurst_stack_depth + 1 if Bla_typeId[b] == 0 then if b == 0 then call error("Nullpointer exception when calling Bla.getJ", "when calling error in Classes_construct.wurst, line 20") else call error("Called Bla.getJ on invalid object.", "when calling error in Classes_construct.wurst, line 20") endif endif set test_Bla_getJ_result = Bla_j[b] set wurst_stack_depth = wurst_stack_depth - 1 if test_Bla_getJ_result != 14 then call testFail("j") else set wurst_stack[wurst_stack_depth] = "when calling getK in Classes_construct.wurst, line 36" set wurst_stack_depth = wurst_stack_depth + 1 if Bla_typeId[b] == 0 then if b == 0 then call error("Nullpointer exception when calling Bla.getK", "when calling error in Classes_construct.wurst, line 24") else call error("Called Bla.getK on invalid object.", "when calling error in Classes_construct.wurst, line 24") endif endif set wurst_stack_depth = wurst_stack_depth - 1 call testSuccess() endif endif set wurst_stack_depth = wurst_stack_depth - 1 endfunction function main takes nothing returns nothing call initGlobals() call init_test("when calling init_test in Classes_construct.wurst, line 1") endfunction function config takes nothing returns nothing endfunction