Attention is currently required from: laforge, pespin.
1 comment:
File bts/BTS_Tests.ttcn:
Patch Set #1, Line 2546: case (tr_RSL_ChanMode_SIGN)
what? you can use templates as cases?
Yeah, why not? :) ETSI ES 201 873-1 defines the syntax as follows:
```
select "(" SingleExpression ")" "{"
{ case "(" { TemplateInstance[","] } ")" StatementBlock }+
[ case else StatementBlock ]
"}"
```
I wonder how is that implemented, given that 2 templates could match the same value...
I guess the one that matches first wins.
did you make sure this works as expected?
Yes. Actually we already do have templates-in-select in our code base:
```
bsc/BSC_Tests.ttcn: select (arfcn_) {
bsc/BSC_Tests.ttcn- case (tr_GsmBandArfcn((259..293), false, ?)) { band := "GSM450"; }
bsc/BSC_Tests.ttcn- case (tr_GsmBandArfcn((306..340), false, ?)) { band := "GSM480"; }
bsc/BSC_Tests.ttcn- case (tr_GsmBandArfcn((438..511), false, ?)) { band := "GSM750"; }
bsc/BSC_Tests.ttcn- case (tr_GsmBandArfcn((128..251), false, ?)) { band := "GSM850"; }
bsc/BSC_Tests.ttcn- case (tr_GsmBandArfcn((0..124), false, ?)) { band := "GSM900"; }
```
To view, visit change 33035. To unsubscribe, or for help writing mail filters, visit settings.