conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / 06_types_and_values / 0602_structured_types_and_values / 060206_anytype / Sem_060206_anytype_019.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.0.6, ensure that anytype (as a user defined type) can be imported from another module
13 ** @verdict pass accept, ttcn3verdict:pass
14 ***************************************************/
15
16 module Sem_060206_anytype_019 {
17 import from Sem_060206_anytype_019_import all; // this contains a type (anytype) MyAnyType
18
19 type component GeneralComp {
20 var MyAnyType x; // MyAnyType is an anytype defined in module Sem_060206_anytype_017_import
21 var MyAnyType y;
22 }
23
24
25 testcase TC_Sem_060206_anytype_019() runs on GeneralComp {
26
27 x.float := 10.0E0; //anytype x is now a float with value 10.0
28 y.bitstring := '1010'B; //anytype y is now a bitstring with value 1010
29
30 if (match(x.float, 10.0E0) and match(y.bitstring, '1010'B)) {
31 setverdict(pass);
32 }
33 else {
34 setverdict(fail);
35 }
36
37 }
38
39 control {
40 execute(TC_Sem_060206_anytype_019());
41 }
42
43 }
This page took 0.032973 seconds and 5 git commands to generate.