array Person_nextFree287 integer Person_firstFree612 integer Person_maxIndex121 array Person_typeId113 array Person_name204 integer wurst_stack_depth507 array wurst_stack124 integer Person_firstFree612 = 0 integer Person_maxIndex121 = 0 integer wurst_stack_depth507 = 0 function initGlobals825() { } function main127() { initGlobals825(); init_test162("when calling init_test in Classes_method.wurst, line 1"); } function config152() { } function init_test162(string __wurst_stackPos116) { local integer p100 wurst_stack_124[wurst_stack_depth_507] = __wurst_stackPos_116; wurst_stack_depth_507 = (wurst_stack_depth_507 + 1); p_100 = new_Person994("peq", "when calling new_Person in Classes_method.wurst, line 25"); wurst_stack_124[wurst_stack_depth_507] = "when calling getName in Classes_method.wurst, line 26"; wurst_stack_depth_507 = (wurst_stack_depth_507 + 1); if (Person_typeId_113[p_100] == 0) { if (p_100 == 0) { error115("Nullpointer exception when calling Person.getName", "when calling error in Classes_method.wurst, line 14"); } else { error115("Called Person.getName on invalid object.", "when calling error in Classes_method.wurst, line 14"); }; } else { }; __wurst_stackPos_116 = Person_name_204[p_100]; wurst_stack_depth_507 = (wurst_stack_depth_507 - 1); if (__wurst_stackPos_116 != "peq") { testFail519("name != peq"); } else { wurst_stack_124[wurst_stack_depth_507] = "when calling setName in Classes_method.wurst, line 29"; wurst_stack_depth_507 = (wurst_stack_depth_507 + 1); if (Person_typeId_113[p_100] == 0) { if (p_100 == 0) { error115("Nullpointer exception when calling Person.setName", "when calling error in Classes_method.wurst, line 10"); } else { error115("Called Person.setName on invalid object.", "when calling error in Classes_method.wurst, line 10"); }; } else { }; Person_name_204[p_100] = "Frotty"; wurst_stack_depth_507 = (wurst_stack_depth_507 - 1); wurst_stack_124[wurst_stack_depth_507] = "when calling getName in Classes_method.wurst, line 30"; wurst_stack_depth_507 = (wurst_stack_depth_507 + 1); if (Person_typeId_113[p_100] == 0) { if (p_100 == 0) { error115("Nullpointer exception when calling Person.getName", "when calling error in Classes_method.wurst, line 14"); } else { error115("Called Person.getName on invalid object.", "when calling error in Classes_method.wurst, line 14"); }; } else { }; __wurst_stackPos_116 = Person_name_204[p_100]; wurst_stack_depth_507 = (wurst_stack_depth_507 - 1); if (__wurst_stackPos_116 == "Frotty") { testSuccess109(); } else { testFail519("name != Frotty."); }; }; wurst_stack_depth_507 = (wurst_stack_depth_507 - 1); } IS_NATIVE function testFail519(string msg197) { } IS_NATIVE function testSuccess109() { } function new_Person994(string n210, string __wurst_stackPos158) returns integer { local integer this114 wurst_stack_124[wurst_stack_depth_507] = __wurst_stackPos_158; wurst_stack_depth_507 = (wurst_stack_depth_507 + 1); wurst_stack_124[wurst_stack_depth_507] = "when calling alloc_Person in Classes_method.wurst, line 18"; wurst_stack_depth_507 = (wurst_stack_depth_507 + 1); if (Person_firstFree_612 == 0) { if (Person_maxIndex_121 < 32768) { Person_maxIndex_121 = (Person_maxIndex_121 + 1); this_114 = Person_maxIndex_121; Person_typeId_113[this_114] = 1; } else { error115("Out of memory: Could not create Person.", "when calling error in Classes_method.wurst, line 7"); this_114 = 0; }; } else { Person_firstFree_612 = (Person_firstFree_612 - 1); this_114 = Person_nextFree_287[Person_firstFree_612]; Person_typeId_113[this_114] = 1; }; wurst_stack_depth_507 = (wurst_stack_depth_507 - 1); Person_name_204[this_114] = n_210; wurst_stack_depth_507 = (wurst_stack_depth_507 - 1); return this_114; } function error115(string msg706, string __wurst_stackPos105) { local integer stacktraceIndex182 local integer stacktraceLimit539 wurst_stack_124[wurst_stack_depth_507] = __wurst_stackPos_105; wurst_stack_depth_507 = (wurst_stack_depth_507 + 1); __wurst_stackPos_105 = ""; stacktraceIndex_182 = wurst_stack_depth_507; stacktraceLimit_539 = 0; loop { stacktraceIndex_182 = (stacktraceIndex_182 - 1); stacktraceLimit_539 = (stacktraceLimit_539 + 1); exitwhen ((stacktraceLimit_539 > 20) or (stacktraceIndex_182 < 0)); __wurst_stackPos_105 = (__wurst_stackPos_105 + (" " + wurst_stack_124[stacktraceIndex_182])); }; $debugPrint143((msg_706 + (" " + __wurst_stackPos_105))); wurst_stack_depth_507 = (wurst_stack_depth_507 - 1); }