diff options
author | Björn Gustavsson <[email protected]> | 2014-09-19 15:42:40 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-01-12 11:40:23 +0100 |
commit | d73a835b66911935024019fd55089a1e0f7a81d2 (patch) | |
tree | 64ca826f3d906848da58d5075f63bcd1686931b9 /lib/asn1/test/asn1_SUITE_data/ValueTest.asn | |
parent | cb6a006acbcec5aae7cf94f163f101fb6c9d439a (diff) | |
download | otp-d73a835b66911935024019fd55089a1e0f7a81d2.tar.gz otp-d73a835b66911935024019fd55089a1e0f7a81d2.tar.bz2 otp-d73a835b66911935024019fd55089a1e0f7a81d2.zip |
Check INTEGER values better
There is duplicated effort in that validate_integer() checks
whether the integer value is valid, and then normalize_integer()
does mostly the same work in order to convert the value to an
integer.
Eliminate the validate_integer() function and incorporate
its checks into normalize_integer(). Also produce proper
error messages.
Diffstat (limited to 'lib/asn1/test/asn1_SUITE_data/ValueTest.asn')
-rw-r--r-- | lib/asn1/test/asn1_SUITE_data/ValueTest.asn | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/asn1/test/asn1_SUITE_data/ValueTest.asn b/lib/asn1/test/asn1_SUITE_data/ValueTest.asn index dae9ae498a..8db2fcf17d 100644 --- a/lib/asn1/test/asn1_SUITE_data/ValueTest.asn +++ b/lib/asn1/test/asn1_SUITE_data/ValueTest.asn @@ -50,4 +50,15 @@ my-universalstring UniversalString ::= {"This is a capital A: ", greekCapitalLetterSigma, "; try and spot the difference!"} +-- Useful parameterized SEQUENCE. +ParamSeq{Type} ::= SEQUENCE { + a Type +} + +-- Integer values. +IntegerSeq ::= ParamSeq{INTEGER} +someInteger INTEGER ::= 42 +integerSeq1 IntegerSeq ::= { a otherInteger } +otherInteger INTEGER ::= someInteger + END |