blob: 2ab4748d05b542fe0384f0ee9643e4671b54cce5 [file] [log] [blame]
Lev Walkinb7f17972005-03-04 09:10:19 +00001
2-- OK: Everything is Fine
3
4-- iso.org.dod.internet.private.enterprise (1.3.6.1.4.1)
5-- .spelio.software.asn1c.test (9363.1.5.1)
6-- .72
7
8ModuleTestSameNames
9 { iso org(3) dod(6) internet(1) private(4) enterprise(1)
10 spelio(9363) software(1) asn1c(5) test(1) 72 }
11 DEFINITIONS ::=
12BEGIN
13
14 /*
15 * This test checks whether different top-level types containing
16 * similarly named inner types may be compiled by the target language
17 * compiler successfully. This was not the case before asn1c-0.9.11.
18 */
19
20 Type ::= SET OF SEQUENCE {
21 t1 Type1,
22 t2 Type2
23 }
24
25 Type1 ::= SEQUENCE {
26 one-name CHOICE {
27 another-name SEQUENCE { a INTEGER, b INTEGER }
28 }
29 }
30
31 Type2 ::= CHOICE {
32 one-name SEQUENCE {
33 another-name SEQUENCE {
Lev Walkind523ea42017-09-06 22:15:08 -070034 a BIT STRING { one(0) } (SIZE(2)),
Lev Walkinb7f17972005-03-04 09:10:19 +000035 b INTEGER
36 }
37 },
38 two-name SET {
39 another-name SEQUENCE {
Lev Walkind523ea42017-09-06 22:15:08 -070040 a BIT STRING { one(0) } (SIZE(2)),
Lev Walkinb7f17972005-03-04 09:10:19 +000041 b INTEGER
42 }
43 }
44 }
45
46END