conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / 06_types_and_values / 0602_structured_types_and_values / 060212_addressing_entities_inside_sut / NegSem_060212_AddressingEntitiesInsideSut_004.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:6.2.12, Ensure that address type cannot be used in a to part of sender operation with connected ports
13 ** @verdict pass reject
14 ***************************************************/
15
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.*/
20
21
22 module NegSem_060212_AddressingEntitiesInsideSut_004 {
23
24 type integer MyAddress;
25 type integer MyMessType;
26 type integer address;
27
28
29 type port PortType message {
30 address MyAddress;
31 inout MyMessType;
32 } with {extension "internal"}
33
34 type component TestCaseComp {
35 port PortType p1;
36 port PortType p2;
37 }
38
39 function CheckConnected() runs on TestCaseComp
40 {
41 if(p1.checkstate("Connected")) {
42 setverdict(pass,"Connected");
43 } else {
44 setverdict(fail,"Not connected");
45 }
46 }
47
48 testcase TC_NegSem_060212_AddressingEntitiesInsideSut_004() runs on TestCaseComp system TestCaseComp {
49
50 var PortType.address MySUTentity := 1;
51
52
53 connect(mtc:p1, mtc:p2);
54
55 p1.send(MyMessType: 1) to MySUTentity; //error: address type is allowed in to part send operation
56
57 setverdict(pass);
58 }
59
60 control {
61 execute(TC_NegSem_060212_AddressingEntitiesInsideSut_004());
62 }
63 }
This page took 0.032669 seconds and 5 git commands to generate.