conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / 22_communication_operations / 2203_procedure_based_communication / 220302_getcall_operation / NegSem_220302_GetcallOperation_017.ttcn
1 /******************************************************************************
2 * Copyright (c) 2000-2016 Ericsson Telecom AB
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * Adrien Kirjak – initial implementation
10 *
11 ** @version 0.0.1
12 ** @purpose 1:22.3.2, incompatible decmatch and @decoded value redirect
13 ** @verdict pass accept, ttcn3verdict:pass
14 *****************************************************************/
15
16 // The following requirements are tested:
17 // When assigning implicitly decoded parameters (by using the @decoded modifier)
18 // in cases where the value or template to be matched uses the MatchDecodedContent
19 // (decmatch) matching for the parameter to be stored, the type of the template in
20 // the MatchDecodedContent matching shall be type-compatible to the type of the
21 // variable the decoded field is stored into.
22
23 module NegSem_220302_GetcallOperation_017 {
24 signature S(bitstring p_par);
25
26 type port P procedure {
27 inout S;
28 } with {extension "internal"}
29
30 type component GeneralComp {
31 port P p;
32 }
33
34 type record Wrapped {
35 integer num
36 }
37
38 function f_server() runs on GeneralComp {
39 var Wrapped v_res;
40 alt {
41 [] p.getcall(S:{ p_par := decmatch integer:? }) -> param (v_res := @decoded p_par) {
42 setverdict (pass);
43 }
44 [] p.getcall { setverdict(pass); }
45 }
46 }
47
48 testcase TC_NegSem_220302_GetcallOperation_017() runs on GeneralComp system GeneralComp {
49 var integer v_src := 5;
50 var bitstring v_bs := encvalue(v_src);
51 var GeneralComp v_ptc := GeneralComp.create("PTC");
52 connect(self:p, v_ptc:p);
53 v_ptc.start(f_server());
54 p.call(S:{ p_par := v_bs }, nowait);
55 v_ptc.done;
56 setverdict(pass);
57 }
58
59 control {
60 execute(TC_NegSem_220302_GetcallOperation_017(), 5.0);
61 }
62 }
This page took 0.038964 seconds and 5 git commands to generate.