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
9 * Adrien Kirjak – initial implementation
12 ** @purpose 1:6.2.12, Ensure that address type cannot be used in a sender part of receive operation with connected ports
13 ** @verdict pass reject
14 ***************************************************/
16 /* The following requirements are tested:
17 * Restrictions c) The address data type shall not be used in the to,
18 * from and sender parts of receive and send operations of connected ports,
19 * i.e, ports used for the communication among test components.*/
22 module NegSem_060212_AddressingEntitiesInsideSut_003 {
24 type integer MyAddress;
25 type integer MyMessType;
29 type port PortType message {
32 } with {extension "internal"}
34 type component TestCaseComp {
38 function Sendmessage() runs on TestCaseComp
40 if(p.checkstate("Connected")) {
41 p.send(MyMessType: 1) to mtc;
43 setverdict(fail,"Not connected");
49 testcase TC_NegSem_060212_AddressingEntitiesInsideSut_003() runs on TestCaseComp system TestCaseComp {
51 var TestCaseComp v_ptcA := TestCaseComp.create alive;
53 var address MyAddr := 1;
55 connect(mtc:p, v_ptcA:p);
57 v_ptcA.start(Sendmessage());
60 p.receive(MyMessType:1) -> sender MyAddr; //error: address type is allowed in sender part receive operation
66 execute(TC_NegSem_060212_AddressingEntitiesInsideSut_003());