Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
asn1c
Commits
9f78ca65
Commit
9f78ca65
authored
Jan 22, 2024
by
v0-e
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Default class syntax test 164
parent
8ca8e0ef
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
0 deletions
+74
-0
tests/tests-asn1c-compiler/164-class-default-syntax-OK.asn1
tests/tests-asn1c-compiler/164-class-default-syntax-OK.asn1
+40
-0
tests/tests-c-compiler/Makefile.am
tests/tests-c-compiler/Makefile.am
+1
-0
tests/tests-c-compiler/check-src/check-164.c
tests/tests-c-compiler/check-src/check-164.c
+33
-0
No files found.
tests/tests-asn1c-compiler/164-class-default-syntax-OK.asn1
0 → 100644
View file @
9f78ca65
-- OK: Everything is fine
-- iso.org.dod.internet.private.enterprise (1.3.6.1.4.1)
-- .spelio.software.asn1c.test (9363.1.5.1)
-- .164
ModuleClassDefaultSyntax
{ iso org(3) dod(6) internet (1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 164 }
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
DCLASS ::= CLASS {
&id INTEGER,
&Type
}
Ordered DCLASS ::= {
{&id 1, &Type UTF8String} |
{&id 2, &Type OCTET STRING}
}
Unordered DCLASS ::= {
{&Type UTF8String, &id 17} |
{&id 8, &Type OCTET STRING}
}
A ::= SEQUENCE
{
a-Ordered-id DCLASS.&id ({Ordered}),
a-Ordered-val DCLASS.&Type ({Ordered}{@a-Ordered-id})
}
B ::= SEQUENCE
{
b-Unordered-id DCLASS.&id ({Unordered}),
b-Unordered-val DCLASS.&Type ({Unordered}{@b-Unordered-id})
}
END
tests/tests-c-compiler/Makefile.am
View file @
9f78ca65
...
...
@@ -62,6 +62,7 @@ TESTS += check-src/check-92.-findirect-choice.c
TESTS
+=
check-src/check-92.c
TESTS
+=
check-src/check-158.-fcompound-names.c
TESTS
+=
check-src/check-159.c
TESTS
+=
check-src/check-164.c
if
TEST_64BIT
TESTS
+=
check-src/check64-134.-gen-UPER.c
...
...
tests/tests-c-compiler/check-src/check-164.c
0 → 100644
View file @
9f78ca65
#undef NDEBUG
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <string.h>
#include <assert.h>
#include <A.h>
#include <B.h>
int
main
(
int
ac
,
char
**
av
)
{
A_t
a
;
B_t
b
;
(
void
)
ac
;
/* Unused argument */
(
void
)
av
;
/* Unused argument */
memset
(
&
a
,
0
,
sizeof
(
a
));
memset
(
&
b
,
0
,
sizeof
(
b
));
/* Check existence of the following enum values */
assert
(
a_Ordered_val_PR_UTF8String
);
assert
(
a_Ordered_val_PR_OCTET_STRING
);
assert
(
b_Unordered_val_PR_UTF8String
);
assert
(
b_Unordered_val_PR_OCTET_STRING
);
/*
* No plans to fill it up: just checking whether it compiles or not.
*/
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment