Commit | Line | Data |
---|---|---|
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 | ******************************************************************************/ | |
8 | module transparent { | |
9 | ||
10 | type 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). | |
15 | function 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 | } | |
21 | with { | |
22 | extension "transparent"; | |
23 | } | |
24 | ||
25 | template charstring super := pattern "*fragil*"; | |
26 | ||
27 | testcase comp() runs on Glass | |
28 | { | |
29 | var charstring inx := "Supercalifragilistic"; | |
30 | compare(inx, super); | |
31 | } | |
32 | ||
33 | control | |
34 | { | |
35 | execute(comp()); | |
36 | } | |
37 | ||
38 | } |