diff options
author | Oliver Smith <osmith@sysmocom.de> | 2019-07-19 12:33:12 +0200 |
---|---|---|
committer | Oliver Smith <osmith@sysmocom.de> | 2019-07-22 11:35:23 +0200 |
commit | af2f1f8d8989a96d6a213fe9316e2e1fee718b81 (patch) | |
tree | cbcf545f3bcabea5298415d7b1a97df7fe5cb5cb /library | |
parent | a2c68e81f941ad7b8e4d8f422c898c237a8d0e77 (diff) |
library: allow "?" in tr_ML3_MT_MM_ID_Req again
Fix MSC test TC_lu_by_imei, which uses tr_ML3_MT_MM_ID_Req with the
default "?" (AnyElement) parameter. It was failing with the following
runtime error:
Dynamic test case error: Performing a valueof or send operation on a non-specific template of enumerated type @L3_Templates.CmIdentityType.
Fixes: 328984591372ad5abf51655a51d45d880bfed182 ("L3_Templates: add enum CmIdentityType")
Related: https://www.eclipse.org/forums/index.php/t/1099816/
Change-Id: Ie7fbe52ac3c0c8f233680dcc311febec77d2ed0b
Diffstat (limited to 'library')
-rw-r--r-- | library/L3_Templates.ttcn | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn index 30119198..bc0e7975 100644 --- a/library/L3_Templates.ttcn +++ b/library/L3_Templates.ttcn @@ -873,6 +873,14 @@ template PDU_ML3_NW_MS tr_ML3_MT_LU_Rej(template OCT1 cause := ?) := { } } +private function f_id_type_or_any(template CmIdentityType id_type) return template bitstring { + if (istemplatekind(id_type, "?")) { + return ?; + } else { + return int2bit(enum2int(valueof(id_type)), 3); + } +} + template PDU_ML3_NW_MS tr_ML3_MT_MM_ID_Req(template CmIdentityType id_type := ?) := { discriminator := '0101'B, tiOrSkip := { @@ -883,7 +891,7 @@ template PDU_ML3_NW_MS tr_ML3_MT_MM_ID_Req(template CmIdentityType id_type := ?) identityRequest := { messageType := '011000'B, nsd := '00'B, - identityType := int2bit(enum2int(valueof(id_type)), 3), + identityType := f_id_type_or_any(id_type), spare1_5 := ? } } |