BTS_Tests.ttcn: share as_rsl_sacch_ind() and as_rsl_any_ind()

Change-Id: I7ace54643c10df38a3ea941242f8b65264ef1322
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 162bfe6..c95f48a 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -3728,6 +3728,23 @@
 	}
 }
 
+/* Expect (or not expect) SACCH messages (Measurement Reports) */
+private altstep as_rsl_sacch_ind(boolean exp_sacch) runs on ConnHdlr {
+	[exp_sacch] RSL.receive(tr_RSL_UNITDATA_IND(g_chan_nr, tr_RslLinkID_SACCH(?))) { repeat; }
+	[not exp_sacch] RSL.receive(tr_RSL_UNITDATA_IND(g_chan_nr, tr_RslLinkID_SACCH(?))) {
+		setverdict(fail, "Unexpected (SACCH) UNIT_DATA_IND message!");
+		mtc.stop;
+		}
+}
+/* Expect (or not expect) other kinds of messages */
+private altstep as_rsl_any_ind(boolean exp_any) runs on ConnHdlr {
+	[exp_any] RSL.receive { repeat; }
+	[not exp_any] RSL.receive {
+		setverdict(fail, "Unexpected RSL message!");
+		mtc.stop;
+		}
+}
+
 /* Send UI frame from MS and expect it to arrive as RLL UNITDATA IND on Abis */
 function f_unitdata_mo(
 	RslLinkId link_id,
@@ -3743,18 +3760,8 @@
 	[] RSL.receive(tr_RSL_UNITDATA_IND(g_chan_nr, link_id, l3)) {
 		setverdict(pass);
 		}
-	/* Expect (or not expect) SACCH messages (Measurement Reports) */
-	[exp_sacch] RSL.receive(tr_RSL_UNITDATA_IND(g_chan_nr, tr_RslLinkID_SACCH(?))) { repeat; }
-	[not exp_sacch] RSL.receive(tr_RSL_UNITDATA_IND(g_chan_nr, tr_RslLinkID_SACCH(?))) {
-		setverdict(fail, "Unexpected (SACCH) UNIT_DATA_IND message!");
-		mtc.stop;
-		}
-	/* Expect (or not expect) other kinds of messages */
-	[exp_any] RSL.receive { repeat; }
-	[not exp_any] RSL.receive {
-		setverdict(fail, "Unexpected RSL message!");
-		mtc.stop;
-		}
+	[] as_rsl_sacch_ind(exp_sacch);
+	[] as_rsl_any_ind(exp_any);
 	[] T.timeout {
 		setverdict(fail, "Timeout waiting for UNIT_DATA_IND");
 		mtc.stop;