aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/test/testConstraints.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/asn1/test/testConstraints.erl')
-rw-r--r--lib/asn1/test/testConstraints.erl16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/asn1/test/testConstraints.erl b/lib/asn1/test/testConstraints.erl
index d32e99eaaf..543c106e8a 100644
--- a/lib/asn1/test/testConstraints.erl
+++ b/lib/asn1/test/testConstraints.erl
@@ -85,6 +85,22 @@ int_constraints(Rules) ->
end,
%%==========================================================
+ %% SingleValue3 ::= INTEGER (Predefined | 5 | 10)
+ %% Testcase for OTP-10139. A single value subtyping of an integer type
+ %% where one value is predefined.
+ %%==========================================================
+
+ ?line {ok,BytesSV3} = asn1_wrapper:encode('Constraints','SingleValue3',1),
+ ?line {ok,1} = asn1_wrapper:decode('Constraints','SingleValue3',
+ lists:flatten(BytesSV3)),
+ ?line {ok,BytesSV3_2} = asn1_wrapper:encode('Constraints','SingleValue3',5),
+ ?line {ok,5} = asn1_wrapper:decode('Constraints','SingleValue3',
+ lists:flatten(BytesSV3_2)),
+ ?line {ok,BytesSV3_3} = asn1_wrapper:encode('Constraints','SingleValue3',10),
+ ?line {ok,10} = asn1_wrapper:decode('Constraints','SingleValue3',
+ lists:flatten(BytesSV3_3)),
+
+ %%==========================================================
%% Range2to19 ::= INTEGER (1<..<20)
%%==========================================================