| 1 |
|
| 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 |
|
| 8 |
ModuleTestSameNames |
| 9 |
{ iso org(3) dod(6) internet(1) private(4) enterprise(1) |
| 10 |
spelio(9363) software(1) asn1c(5) test(1) 72 } |
| 11 |
DEFINITIONS ::= |
| 12 |
BEGIN |
| 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 { |
| 34 |
a BIT STRING { one(0) } SIZE(2), |
| 35 |
b INTEGER |
| 36 |
} |
| 37 |
}, |
| 38 |
two-name SET { |
| 39 |
another-name SEQUENCE { |
| 40 |
a BIT STRING { one(0) } SIZE(2), |
| 41 |
b INTEGER |
| 42 |
} |
| 43 |
} |
| 44 |
} |
| 45 |
|
| 46 |
END |