PCU: introduce TC_egprs_pkt_chan_req_reject_emergency

At the moment, the IUT does not support any emergency services.
Make sure that EGPRS Packet Channel Request for an emergency call
is properly rejected (RR Immediate Assignment Reject).

Note that at the time of writing this test, the IUT does not
handle EGPRS Packet Channel Request properly, so it fails.

Change-Id: I63d989e89e6235a631e024c2810a3a4b0de56ccf
Related: OS#1548
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index fb59c13..999ece0 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -1832,6 +1832,35 @@
 	f_shutdown(__BFILE__, __LINE__, final := true);
 }
 
+/* At the moment, the IUT does not support any emergency services. Make sure
+ * that EGPRS Packet Channel Request for an emergency call is properly rejected. */
+testcase TC_egprs_pkt_chan_req_reject_emergency() runs on RAW_PCU_Test_CT {
+	var template IARRestOctets rest;
+	var BIT5 ext_ra;
+	var BIT11 ra11;
+
+	/* Initialize the PCU interface abstraction */
+	f_init_raw(testcasename());
+
+	var EGPRSPktChRequest req := {
+		/* NOTE: other fields are set in the loop */
+		emergency := { tag := '110111'B }
+	};
+
+	for (var integer i := 0; i < 6; i := i + 1) {
+		ext_ra := int2bit(f_rnd_int(32), 5); /* 5 LSB's of RA11 */
+		rest := tr_IARRestOctets({ *, tr_ExtRAOpt(ext_ra), * });
+
+		req.emergency.random_bits := ext_ra;
+		ra11 := enc_EGPRSPktChRequest2bits(req);
+
+		/* Intentionally incorrect message (see table 11.2.5a.2) */
+		f_TC_egprs_pkt_chan_req_reject(ra11, 1337 + i, rest);
+	}
+
+	f_shutdown(__BFILE__, __LINE__, final := true);
+}
+
 control {
 	execute( TC_pcuif_suspend() );
 	execute( TC_ta_ptcch_idle() );
@@ -1865,6 +1894,7 @@
 	execute( TC_egprs_pkt_chan_req_one_phase() );
 	execute( TC_egprs_pkt_chan_req_two_phase() );
 	execute( TC_egprs_pkt_chan_req_reject_content() );
+	execute( TC_egprs_pkt_chan_req_reject_emergency() );
 
 	execute( TC_mo_ping_pong_with_ul_racap_egprs_only() );
 }