Titan Core Initial Contribution
[deliverable/titan.core.git] / function_test / Semantic_Analyser / xer / untagged_charenc_OK.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 untagged_charenc_OK
9 // All fields are meant to be character-encodable, otherwise the compiler complains;
10 // "UNTAGGED type should be sequence, set, choice, sequence-of, or set-of type"
11 //
12 // Boolean, integer, float and enum are always character-encodable.
13 //
14 // Character string types are character-encodable by default;
15 // this is not strictly correct because control characters should be excluded,
16 // but TITAN does not currently check the subtype.
17 //
18 // Octetstring is character-encodable IF it has base64Binary or hexBinary.
19 //
20 {
21 type record R1 {
22 charstring cs
23 }
24 with {
25 variant (cs) "untagged";
26 }
27
28 type record R2 {
29 universal charstring us
30 } with {
31 variant (us) "untagged";
32 }
33
34 type record R3 {
35 octetstring hex
36 } with {
37 variant (hex) "untagged";
38 variant (hex) "XSD:hexBinary"; // HL70087
39 }
40
41 type record R4 {
42 octetstring b64
43 } with {
44 variant (b64) "untagged";
45 variant (b64) "XSD:base64Binary";
46 }
47
48 type record R5 {
49 integer i
50 } with {
51 variant (i) "untagged";
52 }
53
54 type record R6 {
55 float f
56 } with {
57 variant (f) "untagged";
58 }
59
60 type record R7 {
61 truth t
62 } with {
63 variant (t) "untagged";
64 }
65
66 type enumerated truth
67 {
68 True, False, FileNotFound
69 };
70
71 type record R9 {
72 boolean b
73 } with {
74 variant (b) "untagged";
75 }
76
77
78 /*
79 type record R.. {
80
81 } with {
82
83 }
84
85 */
86 }
87 with {
88 encode "XML"
89 } // end of module
This page took 0.04386 seconds and 5 git commands to generate.