Sync with 5.4.0
[deliverable/titan.core.git] / regression_test / transparent / transparent.ttcn
CommitLineData
970ed795 1/******************************************************************************
3abe9331 2 * Copyright (c) 2000-2015 Ericsson Telecom AB
970ed795
EL
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 ******************************************************************************/
8module transparent {
9
10type component Glass {}
11
12// A hypothetical comparator function.
13// By setting it to transparent, the setverdict line would be logged
14// as if it happened in the caller (the testcase).
15function compare(in charstring act, in template charstring exp)
16{
17 if (match(act, exp))
18 { setverdict(pass); }
19 else { setverdict(fail, match(act, exp)); }
20}
21with {
22 extension "transparent";
23}
24
25template charstring super := pattern "*fragil*";
26
27testcase comp() runs on Glass
28{
29 var charstring inx := "Supercalifragilistic";
30 compare(inx, super);
31}
32
33control
34{
35 execute(comp());
36}
37
38}
This page took 0.032688 seconds and 5 git commands to generate.