conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / 21_configuration_operations / 2103_test_component_operations / 210302_start_test_component / Sem_210302_Start_test_component_008.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:21.3.2, timer reuse in alive component
13 ** @verdict pass accept, ttcn3verdict:pass
14 ***************************************************/
15
16 // The following requirements are tested:
17 // If a function is started on an alive-type PTC after termination of a previous
18 // function, it uses variable values, timers, ports, and the local verdict as they
19 // were left after termination of the previous function.
20
21 module Sem_210302_Start_test_component_008 {
22
23 type component GeneralComp {
24 timer tc_tmr := 30.0;
25 }
26
27 function f_ptcBehaviour() runs on GeneralComp {
28 tc_tmr.start;
29 }
30
31 function f_ptcSecondBehaviour() runs on GeneralComp {
32 if (tc_tmr.running) { setverdict(pass); }
33 else { setverdict(fail); }
34 }
35
36
37 testcase TC_Sem_210302_Start_test_component_008() runs on GeneralComp system GeneralComp {
38 var GeneralComp v_ptc := GeneralComp.create("PTC") alive;
39 v_ptc.start(f_ptcBehaviour());
40 v_ptc.done;
41 v_ptc.start(f_ptcSecondBehaviour());
42 v_ptc.done;
43 setverdict(pass);
44 }
45
46 control{
47 execute(TC_Sem_210302_Start_test_component_008());
48 }
49 }
50
This page took 0.033353 seconds and 5 git commands to generate.