array Person_nextFree392 integer Person_firstFree923 integer Person_maxIndex649 array Person_typeId822 array Person_name101 integer wurst_stack_depth131 array wurst_stack140 integer Person_firstFree923 = 0 integer Person_maxIndex649 = 0 integer wurst_stack_depth131 = 0 function initGlobals270() { } function main163() { initGlobals270(); init_test522("when calling init_test in Classes_method.wurst, line 1"); } function config140() { } function init_test522(string __wurst_stackPos604) { local integer p138 wurst_stack_140[wurst_stack_depth_131] = __wurst_stackPos_604; wurst_stack_depth_131 = (wurst_stack_depth_131 + 1); p_138 = new_Person123("peq", "when calling new_Person in Classes_method.wurst, line 25"); wurst_stack_140[wurst_stack_depth_131] = "when calling getName in Classes_method.wurst, line 26"; wurst_stack_depth_131 = (wurst_stack_depth_131 + 1); if (Person_typeId_822[p_138] == 0) { if (p_138 == 0) { error143("Nullpointer exception when calling Person.getName", "when calling error in Classes_method.wurst, line 14"); } else { error143("Called Person.getName on invalid object.", "when calling error in Classes_method.wurst, line 14"); }; } else { }; __wurst_stackPos_604 = Person_name_101[p_138]; wurst_stack_depth_131 = (wurst_stack_depth_131 - 1); if (__wurst_stackPos_604 != "peq") { testFail179("name != peq"); } else { wurst_stack_140[wurst_stack_depth_131] = "when calling setName in Classes_method.wurst, line 29"; wurst_stack_depth_131 = (wurst_stack_depth_131 + 1); if (Person_typeId_822[p_138] == 0) { if (p_138 == 0) { error143("Nullpointer exception when calling Person.setName", "when calling error in Classes_method.wurst, line 10"); } else { error143("Called Person.setName on invalid object.", "when calling error in Classes_method.wurst, line 10"); }; } else { }; Person_name_101[p_138] = "Frotty"; wurst_stack_depth_131 = (wurst_stack_depth_131 - 1); wurst_stack_140[wurst_stack_depth_131] = "when calling getName in Classes_method.wurst, line 30"; wurst_stack_depth_131 = (wurst_stack_depth_131 + 1); if (Person_typeId_822[p_138] == 0) { if (p_138 == 0) { error143("Nullpointer exception when calling Person.getName", "when calling error in Classes_method.wurst, line 14"); } else { error143("Called Person.getName on invalid object.", "when calling error in Classes_method.wurst, line 14"); }; } else { }; __wurst_stackPos_604 = Person_name_101[p_138]; wurst_stack_depth_131 = (wurst_stack_depth_131 - 1); if (__wurst_stackPos_604 == "Frotty") { testSuccess237(); } else { testFail179("name != Frotty."); }; }; wurst_stack_depth_131 = (wurst_stack_depth_131 - 1); } IS_NATIVE function testFail179(string msg182) { } IS_NATIVE function testSuccess237() { } function new_Person123(string n670, string __wurst_stackPos120) returns integer { local integer this486 wurst_stack_140[wurst_stack_depth_131] = __wurst_stackPos_120; wurst_stack_depth_131 = (wurst_stack_depth_131 + 1); wurst_stack_140[wurst_stack_depth_131] = "when calling alloc_Person in Classes_method.wurst, line 18"; wurst_stack_depth_131 = (wurst_stack_depth_131 + 1); if (Person_firstFree_923 == 0) { if (Person_maxIndex_649 < 32768) { Person_maxIndex_649 = (Person_maxIndex_649 + 1); this_486 = Person_maxIndex_649; Person_typeId_822[this_486] = 1; } else { error143("Out of memory: Could not create Person.", "when calling error in Classes_method.wurst, line 7"); this_486 = 0; }; } else { Person_firstFree_923 = (Person_firstFree_923 - 1); this_486 = Person_nextFree_392[Person_firstFree_923]; Person_typeId_822[this_486] = 1; }; wurst_stack_depth_131 = (wurst_stack_depth_131 - 1); Person_name_101[this_486] = n_670; wurst_stack_depth_131 = (wurst_stack_depth_131 - 1); return this_486; } function error143(string msg184, string __wurst_stackPos130) { local integer stacktraceIndex125 local integer stacktraceLimit154 wurst_stack_140[wurst_stack_depth_131] = __wurst_stackPos_130; wurst_stack_depth_131 = (wurst_stack_depth_131 + 1); __wurst_stackPos_130 = ""; stacktraceIndex_125 = wurst_stack_depth_131; stacktraceLimit_154 = 0; loop { stacktraceIndex_125 = (stacktraceIndex_125 - 1); stacktraceLimit_154 = (stacktraceLimit_154 + 1); exitwhen ((stacktraceLimit_154 > 20) or (stacktraceIndex_125 < 0)); __wurst_stackPos_130 = (__wurst_stackPos_130 + (" " + wurst_stack_140[stacktraceIndex_125])); }; $debugPrint199((msg_184 + (" " + __wurst_stackPos_130))); wurst_stack_depth_131 = (wurst_stack_depth_131 - 1); }