conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / 10_constants / Sem_10_Constants_009.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:10, Set type used as a constant with optional fields
13 ** @verdict pass accept, ttcn3verdict:pass
14 ***************************************************/
15 module Sem_10_Constants_009 {
16
17 type record MySetType
18 {
19 bitstring field1,
20 boolean field2 optional,
21 charstring field3 optional
22
23 };
24
25 type component GeneralComp {
26 }
27
28 testcase TC_Sem_10_Constants_009() runs on GeneralComp {
29 const MySetType c_mST3 := {field1 := '1010'B,
30 field2 := -,
31 field3 := -};
32
33 if (not isbound(c_mST3.field2) and
34 not isbound(c_mST3.field3) and
35 match(c_mST3.field1, '1010'B))
36 {
37 setverdict(pass);
38 }
39 else {
40 setverdict(fail);
41 }
42 }
43
44 control{
45 execute(TC_Sem_10_Constants_009());
46 }
47 }
This page took 0.03895 seconds and 5 git commands to generate.