aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/test/asn1_wrapper.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2010-03-10 07:32:19 +0100
committerBjörn Gustavsson <[email protected]>2010-03-11 10:26:48 +0100
commit44cc5dfcbea91ef419c55a70c67c87b3a44e7a79 (patch)
tree17d04199de37685bfc686cdf7152b93591f4e2b9 /lib/asn1/test/asn1_wrapper.erl
parentc5dff500f4ae51fc2182b1646538e54129e63c37 (diff)
downloadotp-44cc5dfcbea91ef419c55a70c67c87b3a44e7a79.tar.gz
otp-44cc5dfcbea91ef419c55a70c67c87b3a44e7a79.tar.bz2
otp-44cc5dfcbea91ef419c55a70c67c87b3a44e7a79.zip
asn1 tests: Modernize guard tests
Diffstat (limited to 'lib/asn1/test/asn1_wrapper.erl')
-rw-r--r--lib/asn1/test/asn1_wrapper.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/asn1/test/asn1_wrapper.erl b/lib/asn1/test/asn1_wrapper.erl
index 553f0b062c..b1719b03d9 100644
--- a/lib/asn1/test/asn1_wrapper.erl
+++ b/lib/asn1/test/asn1_wrapper.erl
@@ -26,7 +26,7 @@
encode(Module,Type,Value) ->
case asn1rt:encode(Module,Type,Value) of
- {ok,X} when binary(X) ->
+ {ok,X} when is_binary(X) ->
{ok, binary_to_list(X)};
{ok,X} ->
{ok, binary_to_list(list_to_binary(X))};
@@ -38,21 +38,21 @@ decode(Module,Type,Bytes) ->
case Module:encoding_rule() of
ber ->
asn1rt:decode(Module,Type,Bytes);
- ber_bin when binary(Bytes) ->
+ ber_bin when is_binary(Bytes) ->
asn1rt:decode(Module,Type,Bytes);
ber_bin ->
asn1rt:decode(Module,Type,list_to_binary(Bytes));
- ber_bin_v2 when binary(Bytes) ->
+ ber_bin_v2 when is_binary(Bytes) ->
asn1rt:decode(Module,Type,Bytes);
ber_bin_v2 ->
asn1rt:decode(Module,Type,list_to_binary(Bytes));
per ->
asn1rt:decode(Module,Type,Bytes);
- per_bin when binary(Bytes) ->
+ per_bin when is_binary(Bytes) ->
asn1rt:decode(Module,Type,Bytes);
per_bin ->
asn1rt:decode(Module,Type,list_to_binary(Bytes));
- uper_bin when binary(Bytes) ->
+ uper_bin when is_binary(Bytes) ->
asn1rt:decode(Module,Type,Bytes);
uper_bin ->
asn1rt:decode(Module,Type,list_to_binary(Bytes))