conformance_test/positive_tests added
[deliverable/titan.core.git] / conformance_test / positive_tests / B_matching_incoming_values / B01_template_matching / B0105_matching_character_pattern / B010501_set_expression / Sem_B010501_set_expression_005.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:B.1.5.1, Ensure that the IUT correctly handles template matching of character pattern set expressions
13 ** @verdict pass accept, ttcn3verdict:pass
14 ***************************************************/
15
16 module Sem_B010501_set_expression_005 {
17
18
19 type record MessageType {
20 charstring field1,
21 charstring field2,
22 charstring field3
23 }
24
25 type port loopbackPort message {
26 inout MessageType
27 } with {extension "internal"}
28
29 type component GeneralComp {
30 port loopbackPort messagePort
31 }
32
33 testcase TC_Sem_B010501_set_expression_005() runs on GeneralComp {
34
35 var MessageType v_testMessage;
36
37 template MessageType mw_matchingTemplate:= {
38 field1 := pattern "te[pqrs]t[0-9]",
39 field2 := pattern "test[^a-z]",
40 field3 := pattern "test[-]string" //mismatching literal - separator
41 }
42
43 v_testMessage:= {
44 field1 := "test1",
45 field2 := "test1",
46 field3 := "test string"
47 }
48
49 connect(self:messagePort, self:messagePort);
50 messagePort.send(v_testMessage);
51
52 alt {
53 [] messagePort.receive(mw_matchingTemplate) {
54 setverdict(fail);
55 }
56 [] messagePort.receive {
57 setverdict(pass);
58 }
59 }
60 }
61
62 control{
63 execute(TC_Sem_B010501_set_expression_005());
64 }
65
66 }
67
This page took 0.031398 seconds and 5 git commands to generate.