diff options
Diffstat (limited to 'lib/asn1/test/testTypeValueNotation.erl')
-rw-r--r-- | lib/asn1/test/testTypeValueNotation.erl | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/lib/asn1/test/testTypeValueNotation.erl b/lib/asn1/test/testTypeValueNotation.erl index 61d69edd0e..b46d7177f5 100644 --- a/lib/asn1/test/testTypeValueNotation.erl +++ b/lib/asn1/test/testTypeValueNotation.erl @@ -24,13 +24,15 @@ -record('Seq', {octstr, int, bool, enum, bitstr, null, oid, vstr}). main(_Rule, _Option) -> - Value1 = #'Seq'{octstr = [1, 2, 3, 4], - int = 12, - bool = true, - enum = a, - bitstr = <<2#1010:4>>, - null = 'NULL', - oid = {1, 2, 55}, - vstr = "Hello World"}, - {ok, Bytes} = asn1_wrapper:encode('SeqTypeRefPrim', 'Seq', Value1), - {ok, Value1} = asn1_wrapper:decode('SeqTypeRefPrim', 'Seq', Bytes). + Value = #'Seq'{octstr = [1, 2, 3, 4], + int = 12, + bool = true, + enum = a, + bitstr = <<2#1010:4>>, + null = 'NULL', + oid = {1, 2, 55}, + vstr = "Hello World"}, + roundtrip('Seq', Value). + +roundtrip(T, V) -> + asn1_test_lib:roundtrip('SeqTypeRefPrim', T, V). |