aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/test/testValueTest.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/asn1/test/testValueTest.erl')
-rw-r--r--lib/asn1/test/testValueTest.erl20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/asn1/test/testValueTest.erl b/lib/asn1/test/testValueTest.erl
index fdd8b006e2..d9cc3de5eb 100644
--- a/lib/asn1/test/testValueTest.erl
+++ b/lib/asn1/test/testValueTest.erl
@@ -63,4 +63,24 @@ main() ->
42 = M:otherInteger(),
{'IntegerSeq',42} = M:integerSeq1(),
+ %% Value from object
+ 2 = M:'int-from-object-1'(),
+ 4 = M:'int-from-object-2'(),
+ roundtrip_error('II', 1),
+ roundtrip('II', 2),
+ roundtrip('II', 3),
+ roundtrip('II', 4),
+ roundtrip_error('II', 5),
+
ok.
+
+roundtrip(T, V) ->
+ asn1_test_lib:roundtrip('ValueTest', T, V).
+
+roundtrip_error(T, V) ->
+ try asn1_test_lib:roundtrip('ValueTest', T, V) of
+ ok ->
+ test_server:fail()
+ catch _:_ ->
+ ok
+ end.