use testcase.stop() in case of errors of the test system
diff --git a/sysinfo/Test.ttcn b/sysinfo/Test.ttcn
index c8e1f8c..b0e39df 100644
--- a/sysinfo/Test.ttcn
+++ b/sysinfo/Test.ttcn
@@ -148,8 +148,7 @@
function f_si_vecslot_contains_n_of_m(SystemInformationVector arr, RrMessageType key, boolean bcch_ext := false, integer n := 1, integer m := 4) return boolean {
var integer count := 0;
if (sizeof(arr) < m) {
- log("Error: Insufficient SI in array");
- setverdict(fail);
+ testcase.stop("Error: Insufficient SI in array");
return false;
}
for (var integer i:= 0; i < m; i := i + 1) {
@@ -259,7 +258,7 @@
* if System Information type 4 does not contain all information needed for cell
* selection and reselection. */
if (not cfg.bcch_extended) {
- setverdict(fail, "Error: SI7/SI8 require BCCH Extd.");
+ testcase.stop("Error: SI7/SI8 require BCCH Extd.");
}
if (cfg.si7_present) {
f_ensure_si_vec_contains(si_per_tc, 7, SYSTEM_INFORMATION_TYPE_7, true);
@@ -310,13 +309,13 @@
/* viii) System Information type 16 and 17 are only related to the SoLSA service. They
* should not be sent in a cell where network sharing is used (see rule xv). */
if (cfg.si22_present) {
- setverdict(fail, "Error: Cannot have SI16/SI17 and SI22!");
+ testcase.stop("Error: Cannot have SI16/SI17 and SI22!");
}
if (f_si_vec_contains(si_per_tc, SYSTEM_INFORMATION_TYPE_22)) {
setverdict(fail, "Cannot have SI16/SI17 and SI22!");
}
if (not cfg.bcch_extended) {
- setverdict(fail, "Error: SI16/SI17 requires BCCH Extd!");
+ testcase.stop("Error: SI16/SI17 requires BCCH Extd!");
}
if (cfg.si16_present) {
f_ensure_si_vec_contains(si_per_tc, 6, SYSTEM_INFORMATION_TYPE_16, true);
@@ -355,7 +354,7 @@
* on the BCCH Norm, it is sent at least once within any of 4 consecutive occurrences
* of TC = 4. */
if (cfg.si13_present) {
- setverdict(fail, "Error: Cannot have SI13alt and SI13");
+ testcase.stop("Error: Cannot have SI13alt and SI13");
}
if (f_si_vec_contains(si_per_tc, SYSTEM_INFORMATION_TYPE_13)) {
setverdict(fail, "Cannot have SI13alt and SI13");
@@ -399,14 +398,14 @@
* Information Type 22 instances shall be sent on BCCH Ext within any occurrence of TC
* =2 and TC=6. */
if (cfg.si16_present or cfg.si17_present) {
- setverdict(fail, "Error: Cannot have SI16/SI17 and SI22!");
+ testcase.stop("Error: Cannot have SI16/SI17 and SI22!");
}
if (f_si_vec_contains(si_per_tc, SYSTEM_INFORMATION_TYPE_16) or
f_si_vec_contains(si_per_tc, SYSTEM_INFORMATION_TYPE_17)) {
setverdict(fail, "Cannot have SI16/SI17 and SI22!");
}
if (not cfg.bcch_extended) {
- setverdict(fail, "Error: SI22 requires BCCH Extd!");
+ testcase.stop("Error: SI22 requires BCCH Extd!");
} else {
f_ensure_si_vec_contains_only(si_per_tc, 2, SYSTEM_INFORMATION_TYPE_22, true);
f_ensure_si_vec_contains_only(si_per_tc, 6, SYSTEM_INFORMATION_TYPE_22, true);
@@ -658,7 +657,7 @@
[] pt.receive(NORMAL_PROMPT) { };
[] pt.receive(ENABLE_PROMPT) { };
[] pt.receive(config_pattern) { };
- [] pt.receive(t_vty_unknown) { setverdict(fail, "VTY: Unknown Command") };
+ [] pt.receive(t_vty_unknown) { testcase.stop(fail, "VTY: Unknown Command") };
[] pt.receive(charstring:?) -> value rx { buf := buf & rx; repeat };
[] T.timeout { setverdict(fail, "VTY Timeout for prompt"); return ""};
}