NativeEnumerated.c vars NULL init and check
[com/asn1c.git] / tests / tests-asn1c-compiler / 31-set-of-OK.asn1
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 -- .31
7
8 ModuleTestSetOfSimple
9         { iso org(3) dod(6) internet(1) private(4) enterprise(1)
10                 spelio(9363) software(1) asn1c(5) test(1) 31 }
11         DEFINITIONS IMPLICIT TAGS ::=
12 BEGIN
13
14         Forest ::= SET OF Tree
15
16         Tree ::= SEQUENCE {
17                 height  INTEGER,
18                 width   INTEGER
19         }
20
21         -- The following clause tests OPTIONAL.
22         Stuff ::= SET {
23                         trees    [1] SET OF Forest OPTIONAL,
24                         ...,
25                         other    CHOICE {
26                                 a [0] INTEGER,
27                                 b [3] INTEGER
28                         },
29                         ...,
30                         anything [2] SET OF
31                                 SEQUENCE {
32                                         cup-of-coffee   BIT STRING,
33                                         ...
34                                 } OPTIONAL
35                         -- The above OPTIONAL applies to the "anything"
36                         -- member of the outer CHOICE,
37                         -- not to the SET OF's embedded SEQUENCE!
38                 }
39
40 END