BSC_Tests/hopping: also verify handling of ARFCN 0 in MA

According to 3GPP TS 44.018, table 10.5.2.21.1 "Mobile Allocation
information element", in the cell allocation frequency list the
absolute RF channel numbers are placed in increasing order of ARFCN,
except that ARFCN 0, if included in the set, is put in the last
position in the list.

Let's verify that the IUT handles this corner case correctly.

Change-Id: I3afadfde03f6ea766c0756a181ef129e4b05c383
Related: SYS#4868, OS#4545
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index da2e41a..8934f42 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -6864,8 +6864,8 @@
 runs on test_CT return FHParamsTrx {
 	var FHParamsTrx fhp;
 
-	/* TODO: generate a random ARFCN, including ARFCN 0 */
-	fhp.arfcn := 1;
+	/* Generate a random ARFCN, including ARFCN 0 */
+	fhp.arfcn := f_rnd_int(3);
 
 	for (var integer tn := 0; tn < 8; tn := tn + 1) {
 		if (not match(tn, tr_tn)) {
@@ -6957,7 +6957,7 @@
 	}
 
 	/* Finally, compose the Mobile Allocation bit-mask */
-	for (var integer i := 0; i < lengthof(full_mask); i := i + 1) {
+	for (var integer i := 1; i < lengthof(full_mask); i := i + 1) {
 		if (full_mask[i] != '1'B)
 			{ continue; }
 
@@ -6969,6 +6969,16 @@
 		}
 	}
 
+	/* ARFCN 0 (if present) goes to the last position of the bit-mask */
+	if (full_mask[0] == '1'B) {
+		/* FIXME: ma_mask := ma_mask & slot_mask[0]; // triggers a bug in TITAN */
+		if (slot_mask[0] == '1'B) {
+			ma_mask := ma_mask & '1'B;
+		} else {
+			ma_mask := ma_mask & '0'B;
+		}
+	}
+
 	/* Ensure that ma_mask is octet-aligned */
 	var integer ma_mask_len := (lengthof(ma_mask) + 8 - 1) / 8;
 	ma_mask := f_pad_bit(ma_mask, ma_mask_len * 8, '0'B);