X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=tests%2Ftests-asn1c-compiler%2F154-with-REAL-components-OK.asn1;fp=tests%2Ftests-asn1c-compiler%2F154-with-REAL-components-OK.asn1;h=11abf12787530b4a8ec092ce7e88779e4d2eca95;hb=70ee6fc793ec8e828067a3569849b6c216054497;hp=0000000000000000000000000000000000000000;hpb=59f84608ec15c016958a6e0e0ddd813f376c0925;p=com%2Fasn1c.git diff --git a/tests/tests-asn1c-compiler/154-with-REAL-components-OK.asn1 b/tests/tests-asn1c-compiler/154-with-REAL-components-OK.asn1 new file mode 100644 index 0000000..11abf12 --- /dev/null +++ b/tests/tests-asn1c-compiler/154-with-REAL-components-OK.asn1 @@ -0,0 +1,59 @@ + +-- OK: Everything is fine + +-- iso.org.dod.internet.private.enterprise (1.3.6.1.4.1) +-- .spelio.software.asn1c.test (9363.1.5.1) +-- .154 + +ModuleREALWithComponents + { iso org(3) dod(6) internet(1) private(4) enterprise(1) + spelio(9363) software(1) asn1c(5) test(1) 154 } +DEFINITIONS ::= BEGIN + + UnconstrainedREAL ::= REAL + + WeirdlyConstrainedREAL ::= REAL (3, ...) -- Not really constrained + + Indirect-IEEE-binary32 ::= UnconstrainedREAL (WITH COMPONENTS { + mantissa (-16777215..16777215), + base (2), exponent (-149..104)}) + + -- X.696 (08/2005) #12.2 and #12.3 + + -- IEEE 754 encoding single precision + IEEE-binary32-w ::= REAL (WITH COMPONENTS { + mantissa (-16777215..16777215), + base (2), exponent (-149..104)}) + + IEEE-binary32-0w ::= REAL (0 | WITH COMPONENTS { + mantissa (-16777215..16777215), + base (2), exponent (-149..104)}) + + IEEE-binary32-w0 ::= REAL (WITH COMPONENTS { + mantissa (-16777215..16777215), + base (2), exponent (-149..104)} | 0) + + -- IEEE 754 encoding double precision + IEEE-binary64-w ::= REAL (WITH COMPONENTS { + mantissa (-9007199254740991..9007199254740991), + base (2), exponent (-1074..971)}) + + IEEE-binary64-0w ::= REAL (0 | WITH COMPONENTS { + mantissa (-9007199254740991..9007199254740991), + base (2), exponent (-1074..971)}) + + IEEE-binary64-w0 ::= REAL (WITH COMPONENTS { + mantissa (-9007199254740991..9007199254740991), + base (2), exponent (-1074..971)} | 0) + + Test ::= SEQUENCE { + indirect-ieee-binary32 Indirect-IEEE-binary32, + ieee-binary32-w IEEE-binary32-w, + ieee-binary32-0w IEEE-binary32-0w, + ieee-binary32-w0 IEEE-binary32-w0, + ieee-binary64-w IEEE-binary64-w, + ieee-binary64-0w IEEE-binary64-0w, + ieee-binary64-w0 IEEE-binary64-w0 + } + +END