library: Ensure setverdict(fail) is followed by mtc.stop

This will prevent subsequent failures from overwriting the verdict so we
can easily see the root cause of the test failure.

Using testcase.stop instead for errors internal to our test
infrastructure to mark them as test errors instead of failed.

Change-Id: Idc6819aaf0b01e70c38fad828dd44dcec6bdd778
diff --git a/library/GSUP_Emulation.ttcn b/library/GSUP_Emulation.ttcn
index 7cf1656..86859ba 100644
--- a/library/GSUP_Emulation.ttcn
+++ b/library/GSUP_Emulation.ttcn
@@ -98,9 +98,8 @@
 			return GsupImsiTable[i].comp_ref;
 		}
 	}
-	log("GSUP IMSI table not found by IMSI ", imsi);
-	setverdict(fail);
-	self.stop;
+	setverdict(fail, "GSUP IMSI table not found by IMSI ", imsi);
+	mtc.stop;
 }
 
 /* resolve connection ID by component reference */
@@ -111,9 +110,8 @@
 			return GsupImsiTable[i].imsi;
 		}
 	}
-	log("GSUP IMSI table not found by component ", client);
-	setverdict(fail);
-	self.stop;
+	setverdict(fail, "GSUP IMSI table not found by component ", client);
+	mtc.stop;
 }
 
 private function f_imsi_table_init()
@@ -142,9 +140,7 @@
 			return;
 		}
 	}
-	log("GSUP IMSI table full!");
-	setverdict(fail);
-	self.stop;
+	testcase.stop("GSUP IMSI table full!");
 }
 
 private function f_imsi_table_del(charstring imsi)
@@ -158,9 +154,8 @@
 			return
 		}
 	}
-	log("GSUP IMSI table attempt to delete non-existant ", imsi);
-	setverdict(fail);
-	self.stop;
+	setverdict(fail, "GSUP IMSI table attempt to delete non-existant ", imsi);
+	mtc.stop;
 }
 
 
@@ -190,7 +185,7 @@
 		[] GSUP.receive(ASP_IPA_Event:{up_down:=ASP_IPA_EVENT_UP}) { repeat; }
 		[] GSUP.receive(ASP_IPA_Event:{up_down:=ASP_IPA_EVENT_DOWN}) {
 			setverdict(fail, "GSUP Connection Lost");
-			self.stop;
+			mtc.stop;
 			}
 
 		/* GSUP -> Client: call related messages */
@@ -272,6 +267,7 @@
 		}
 	}
 	setverdict(fail, "Couldn't find GsupExpect for incoming imsi ", imsi);
+	mtc.stop;
 	return ret;
 }
 
@@ -287,7 +283,7 @@
 			return;
 		}
 	}
-	setverdict(fail, "No space left in GsupExpectTable");
+	testcase.stop("No space left in GsupExpectTable");
 }
 
 /* client/conn_hdlr side function to use procedure port to create expect in emulation */