array Person_nextFree270 integer Person_firstFree393 integer Person_maxIndex946 array Person_typeId204 array Person_name170 integer wurst_stack_depth184 array wurst_stack152 integer Person_firstFree393 = 0 integer Person_maxIndex946 = 0 integer wurst_stack_depth184 = 0 function initGlobals239() { } function main160() { initGlobals239(); init_test179("when calling init_test in Classes_method.wurst, line 1"); } function config404() { } function init_test179(string __wurst_stackPos157) { local integer p485 wurst_stack_152[wurst_stack_depth_184] = __wurst_stackPos_157; wurst_stack_depth_184 = (wurst_stack_depth_184 + 1); p_485 = new_Person181("peq", "when calling new_Person in Classes_method.wurst, line 25"); wurst_stack_152[wurst_stack_depth_184] = "when calling getName in Classes_method.wurst, line 26"; wurst_stack_depth_184 = (wurst_stack_depth_184 + 1); if (Person_typeId_204[p_485] == 0) { if (p_485 == 0) { error119("Nullpointer exception when calling Person.getName", "when calling error in Classes_method.wurst, line 14"); } else { error119("Called Person.getName on invalid object.", "when calling error in Classes_method.wurst, line 14"); }; } else { }; __wurst_stackPos_157 = Person_name_170[p_485]; wurst_stack_depth_184 = (wurst_stack_depth_184 - 1); if (__wurst_stackPos_157 != "peq") { testFail545("name != peq"); } else { wurst_stack_152[wurst_stack_depth_184] = "when calling setName in Classes_method.wurst, line 29"; wurst_stack_depth_184 = (wurst_stack_depth_184 + 1); if (Person_typeId_204[p_485] == 0) { if (p_485 == 0) { error119("Nullpointer exception when calling Person.setName", "when calling error in Classes_method.wurst, line 10"); } else { error119("Called Person.setName on invalid object.", "when calling error in Classes_method.wurst, line 10"); }; } else { }; Person_name_170[p_485] = "Frotty"; wurst_stack_depth_184 = (wurst_stack_depth_184 - 1); wurst_stack_152[wurst_stack_depth_184] = "when calling getName in Classes_method.wurst, line 30"; wurst_stack_depth_184 = (wurst_stack_depth_184 + 1); if (Person_typeId_204[p_485] == 0) { if (p_485 == 0) { error119("Nullpointer exception when calling Person.getName", "when calling error in Classes_method.wurst, line 14"); } else { error119("Called Person.getName on invalid object.", "when calling error in Classes_method.wurst, line 14"); }; } else { }; __wurst_stackPos_157 = Person_name_170[p_485]; wurst_stack_depth_184 = (wurst_stack_depth_184 - 1); if (__wurst_stackPos_157 == "Frotty") { testSuccess125(); } else { testFail545("name != Frotty."); }; }; wurst_stack_depth_184 = (wurst_stack_depth_184 - 1); } IS_NATIVE function testFail545(string msg238) { } IS_NATIVE function testSuccess125() { } function new_Person181(string n685, string __wurst_stackPos170) returns integer { local integer this158 wurst_stack_152[wurst_stack_depth_184] = __wurst_stackPos_170; wurst_stack_depth_184 = (wurst_stack_depth_184 + 1); wurst_stack_152[wurst_stack_depth_184] = "when calling alloc_Person in Classes_method.wurst, line 18"; wurst_stack_depth_184 = (wurst_stack_depth_184 + 1); if (Person_firstFree_393 == 0) { if (Person_maxIndex_946 < 32768) { Person_maxIndex_946 = (Person_maxIndex_946 + 1); this_158 = Person_maxIndex_946; Person_typeId_204[this_158] = 1; } else { error119("Out of memory: Could not create Person.", "when calling error in Classes_method.wurst, line 7"); this_158 = 0; }; } else { Person_firstFree_393 = (Person_firstFree_393 - 1); this_158 = Person_nextFree_270[Person_firstFree_393]; Person_typeId_204[this_158] = 1; }; wurst_stack_depth_184 = (wurst_stack_depth_184 - 1); Person_name_170[this_158] = n_685; wurst_stack_depth_184 = (wurst_stack_depth_184 - 1); return this_158; } function error119(string msg130, string __wurst_stackPos271) { local integer stacktraceIndex151 local integer stacktraceLimit135 wurst_stack_152[wurst_stack_depth_184] = __wurst_stackPos_271; wurst_stack_depth_184 = (wurst_stack_depth_184 + 1); __wurst_stackPos_271 = ""; stacktraceIndex_151 = wurst_stack_depth_184; stacktraceLimit_135 = 0; loop { stacktraceIndex_151 = (stacktraceIndex_151 - 1); stacktraceLimit_135 = (stacktraceLimit_135 + 1); exitwhen ((stacktraceLimit_135 > 20) or (stacktraceIndex_151 < 0)); __wurst_stackPos_271 = (__wurst_stackPos_271 + (" " + wurst_stack_152[stacktraceIndex_151])); }; $debugPrint162((msg_130 + (" " + __wurst_stackPos_271))); wurst_stack_depth_184 = (wurst_stack_depth_184 - 1); }