diff options
Diffstat (limited to 'lib/asn1/test/testConstraints.erl')
-rw-r--r-- | lib/asn1/test/testConstraints.erl | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/asn1/test/testConstraints.erl b/lib/asn1/test/testConstraints.erl index 03a09492af..9a1d62993d 100644 --- a/lib/asn1/test/testConstraints.erl +++ b/lib/asn1/test/testConstraints.erl @@ -204,9 +204,8 @@ shorter_ext(uper, "a") -> <<16#80,16#E1>>; shorter_ext(ber, _) -> none. refed_NNL_name(_Erule) -> - ?line {ok,_} = asn1_wrapper:encode('Constraints','AnotherThing',fred), - ?line {error,_Reason} = - asn1_wrapper:encode('Constraints','AnotherThing',fred3). + roundtrip('AnotherThing', fred), + {error,_Reason} = 'Constraints':encode('AnotherThing', fred3). v_roundtrip(Erule, Type, Value) -> Encoded = asn1_test_lib:hex_to_bin(v(Erule, Type, Value)), @@ -216,14 +215,10 @@ roundtrip(Type, Value) -> roundtrip('Constraints', Type, Value). roundtrip(Module, Type, Value) -> - {ok,Encoded} = Module:encode(Type, Value), - {ok,Value} = Module:decode(Type, Encoded), - Encoded. + asn1_test_lib:roundtrip_enc(Module, Type, Value). roundtrip_enc(Type, Value, Enc) -> - Module = 'Constraints', - {ok,Encoded} = Module:encode(Type, Value), - {ok,Value} = Module:decode(Type, Encoded), + Encoded = asn1_test_lib:roundtrip_enc('Constraints', Type, Value), case Enc of none -> ok; Encoded -> ok |