conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / 16_functions_altsteps_testcases / 1602_altsteps / 1602_toplevel / NegSem_1602_toplevel_001.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:16.2, Ensure that the IUT recognizes altstep definitions and correctly evaluates them
13 ** @verdict pass reject
14 ** @configuration external_functions
15 ***************************************************/
16 module NegSem_1602_toplevel_001 {
17
18 type record MessageType {
19 integer field1,
20 charstring field2
21 }
22
23 type port loopbackPort message {
24 inout MessageType
25 } with {extension "internal"}
26
27 type component GeneralComp {
28 port loopbackPort messagePort
29 }
30
31 /**
32 * @desc function returns always 1
33 * @return always 1
34 */
35 external function xf_NegSem_1602_toplevel_001() return integer;
36
37
38 altstep AltSet1() runs on GeneralComp {
39 var integer v_LocalVar := xf_NegSem_1602_toplevel_001();
40 //attempt to use external function for variable initialization
41
42 [] messagePort.receive {
43 setverdict(pass);
44 }
45
46 }
47
48 testcase TC_NegSem_1602_toplevel_001 () runs on GeneralComp {
49 var MessageType v_testMessage;
50 v_testMessage:= {
51 field1 := 1,
52 field2 := "test string"
53 }
54
55 connect(self:messagePort,self:messagePort);
56
57 messagePort.send(v_testMessage);
58
59 AltSet1();
60
61 }
62
63 control{
64
65 execute(TC_NegSem_1602_toplevel_001());
66
67 }
68
69 }
This page took 0.033097 seconds and 5 git commands to generate.