Commit | Line | Data |
---|---|---|
114d1c9a | 1 | /****************************************************************************** |
d44e3c4f | 2 | * Copyright (c) 2000-2016 Ericsson Telecom AB |
114d1c9a 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 | |
d44e3c4f | 7 | * |
8 | * Contributors: | |
9 | * Balasko, Jeno | |
10 | * Raduly, Csaba | |
11 | * | |
114d1c9a EL |
12 | ******************************************************************************/ |
13 | module no_text_all_SE { //^In TTCN-3 module `no_text_all_SE':// | |
14 | // various cases where "TEXT" or "TEXT ALL AS" not allowed | |
15 | ||
16 | type charstring c //^In type definition// \ | |
17 | //^error: TEXT not allowed for type charstring// | |
18 | with { | |
19 | variant "text all as uppercased" | |
20 | } | |
21 | ||
22 | type record r {} //^In type definition// \ | |
23 | //^error: TEXT not allowed for type \@no_text_all_SE.r// | |
24 | with { | |
25 | variant "text all as uppercased" | |
26 | } | |
27 | ||
28 | type record of boolean votes //^In type definition// \ | |
29 | //^error: TEXT not allowed for type @no_text_all_SE.votes// | |
30 | with { | |
31 | variant "text 'true' as 'yea'"; | |
32 | variant "text 'false' as 'nay'"; | |
33 | } | |
34 | ||
35 | type enumerated e { foo, bar, baz } //^In type definition// \ | |
36 | //^error: Lone 'TEXT' only allowed for boolean// | |
37 | with { | |
38 | variant "text"; | |
39 | } | |
40 | ||
41 | type boolean truthiness // should be no error | |
42 | with { | |
43 | variant "text"; | |
44 | } | |
45 | ||
46 | type truthiness reality // boolean, at its heart | |
47 | with { | |
48 | variant "text 'true' as '1'"; | |
49 | } | |
50 | ||
51 | } | |
52 | with { | |
53 | encode "XER"; | |
54 | } |