aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/test/asn1_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2013-09-06 15:21:05 +0200
committerBjörn Gustavsson <[email protected]>2013-09-18 10:22:30 +0200
commita37aee55dccc5ea35ef9b5568cff4bd0364f4b1c (patch)
tree0821f16a726f609e62d4cc6053957318e401c08c /lib/asn1/test/asn1_SUITE.erl
parent905036dccbf7150e26d2db8e8ba04cf779e26fb0 (diff)
downloadotp-a37aee55dccc5ea35ef9b5568cff4bd0364f4b1c.tar.gz
otp-a37aee55dccc5ea35ef9b5568cff4bd0364f4b1c.tar.bz2
otp-a37aee55dccc5ea35ef9b5568cff4bd0364f4b1c.zip
asn1_test_lib: Remove unnecessary loading of a compiled ASN.1 spec
asn1ct:compile/2 calls c:c/2 to invoke the compiler and to load the compiled code. That means that there is no need load the module after having invoked the ASN.1 compiler. To make sure that we'll notice if that behavior changes in the future, extend the rtUI/1 test case to verify that the loaded module has the correct encoding rule (if asn1ct:compile/2 would fail to reload the module, the previous encoding rule would be returned). While at it, it also makes sense to test calling M:bit_string_format/0 to ensure that it continues working.
Diffstat (limited to 'lib/asn1/test/asn1_SUITE.erl')
-rw-r--r--lib/asn1/test/asn1_SUITE.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/asn1/test/asn1_SUITE.erl b/lib/asn1/test/asn1_SUITE.erl
index cb000713cf..0d4f6ddb32 100644
--- a/lib/asn1/test/asn1_SUITE.erl
+++ b/lib/asn1/test/asn1_SUITE.erl
@@ -850,7 +850,10 @@ duplicate_tags(Config) ->
rtUI(Config) -> test(Config, fun rtUI/3).
rtUI(Config, Rule, Opts) ->
asn1_test_lib:compile("Prim", Config, [Rule|Opts]),
- {ok, _} = asn1rt:info('Prim').
+ {ok, _} = asn1rt:info('Prim'),
+ Rule = 'Prim':encoding_rule(),
+ io:format("Default BIT STRING format: ~p\n",
+ ['Prim':bit_string_format()]).
testROSE(Config) -> test(Config, fun testROSE/3).
testROSE(Config, Rule, Opts) ->