Merge github.com:eclipse/titan.core
[deliverable/titan.core.git] / function_test / Semantic_Analyser / xer / no_text_all_SE.ttcn
CommitLineData
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 ******************************************************************************/
13module no_text_all_SE { //^In TTCN-3 module `no_text_all_SE'://
14// various cases where "TEXT" or "TEXT ALL AS" not allowed
15
16type charstring c //^In type definition// \
17//^error: TEXT not allowed for type charstring//
18with {
19 variant "text all as uppercased"
20}
21
22type record r {} //^In type definition// \
23//^error: TEXT not allowed for type \@no_text_all_SE.r//
24with {
25 variant "text all as uppercased"
26}
27
28type record of boolean votes //^In type definition// \
29//^error: TEXT not allowed for type @no_text_all_SE.votes//
30with {
31 variant "text 'true' as 'yea'";
32 variant "text 'false' as 'nay'";
33}
34
35type enumerated e { foo, bar, baz } //^In type definition// \
36//^error: Lone 'TEXT' only allowed for boolean//
37with {
38 variant "text";
39}
40
41type boolean truthiness // should be no error
42with {
43 variant "text";
44}
45
46type truthiness reality // boolean, at its heart
47with {
48 variant "text 'true' as '1'";
49}
50
51}
52with {
53 encode "XER";
54}
This page took 0.045279 seconds and 5 git commands to generate.