conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / 05_basic_language_elements / 0504_parametrization / 0504_toplevel / NegSem_0504_parametrization_incompatibility_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:5.4, Ensure that the IUT correctly handles received testcase parametrization type incompatibility.
13 ** @verdict pass reject
14 ***************************************************/
15 module NegSem_0504_parametrization_incompatibility_001 {
16
17 type enumerated MyEnumeratedType {e_black, e_white}
18 type integer address;
19
20 type record MyRecord {
21 integer field1,
22 boolean field2,
23 address field3,
24 MyEnumeratedType field4,
25 integer field5
26 }
27
28
29 type component GeneralComp {
30
31 }
32
33
34 testcase TC_NegSem_0504_parametrization_incompatibility_001 (
35 MyRecord ExpectedMatch,
36 integer p_integer := 0,
37 boolean p_boolean := true,
38 address p_address := null,
39 MyEnumeratedType p_enumerated := e_black,
40 template integer p_integerTemplate := ?
41 ) runs on GeneralComp {
42
43 // MyRecord cannot be built from the default p_integerTemplate parameter
44 var MyRecord ReceivedRecord := {p_integer, p_boolean, p_address, p_enumerated, p_integerTemplate};
45
46 if ( ReceivedRecord == ExpectedMatch ) {
47 setverdict(pass);
48 }
49 else {
50 setverdict(fail);
51 }
52
53 }
54
55
56 control{
57
58 var MyRecord DefaultValues := {
59 field1 := 0,
60 field2 := true,
61 field3 := null,
62 field4 := e_black,
63 field5 := 1 //any number can be used here to correspond with ? matching
64 }
65
66 execute(TC_NegSem_0504_parametrization_incompatibility_001(DefaultValues));
67 }
68
69 }
This page took 0.03298 seconds and 5 git commands to generate.