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