conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / 21_configuration_operations / 2103_test_component_operations / 210307_done_operation / Sem_210307_done_operation_012.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.7, storing verdict in done operation
13 ** @verdict pass accept, ttcn3verdict:pass
14 *****************************************************************/
15
16 // The following requirements are tested:
17 // When the done operation is applied to a PTC and matches, the final local verdict of the PTC
18 // can be retrieved and stored in variable of the type verdicttype. This is denoted by the
19 // symbol '->' the keyword value followed by the name of the variable into which the verdict
20 // is stored.
21
22 module Sem_210307_done_operation_012 {
23
24 type component GeneralComp {}
25
26 function f() runs on GeneralComp {
27 setverdict(pass);
28 }
29
30 testcase TC_Sem_210307_done_operation_012() runs on GeneralComp system GeneralComp {
31 var GeneralComp v_ptc := GeneralComp.create;
32 var verdicttype v_verdict;
33 v_ptc.start(f());
34 alt {
35 [] v_ptc.done -> value v_verdict {
36 if (v_verdict != pass) { setverdict(fail, "Invalid PTC verdict"); }
37 }
38 }
39 }
40
41 control {
42 execute(TC_Sem_210307_done_operation_012(), 5.0);
43 }
44 }
This page took 0.040052 seconds and 5 git commands to generate.