aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/asn1/test/asn1_SUITE.erl5
-rw-r--r--lib/asn1/test/asn1_test_lib.erl28
2 files changed, 5 insertions, 28 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) ->
diff --git a/lib/asn1/test/asn1_test_lib.erl b/lib/asn1/test/asn1_test_lib.erl
index 60b2b2b42e..5bdd0a4637 100644
--- a/lib/asn1/test/asn1_test_lib.erl
+++ b/lib/asn1/test/asn1_test_lib.erl
@@ -40,15 +40,7 @@ compile_all(Files, Config, Options) ->
compile_file(File, Options) ->
try
- ok = asn1ct:compile(File, [warnings_as_errors|Options]),
- case should_load(File, Options) of
- false ->
- ok;
- {module, Module} ->
- code:purge(Module),
- {module, Module} = code:load_file(Module),
- code:purge(Module)
- end
+ ok = asn1ct:compile(File, [warnings_as_errors|Options])
catch
Class:Reason ->
ct:print("Failed to compile ~s\n", [File]),
@@ -69,24 +61,6 @@ hex_to_bin(S) ->
%%% Internal functions.
%%%
-should_load(File, Options) ->
- case lists:member(abs, Options) of
- true ->
- false;
- false ->
- {module,list_to_atom(strip_extension(filename:basename(File)))}
- end.
-
-strip_extension(File) ->
- strip_extension(File, filename:extension(File)).
-
-strip_extension(File, "") ->
- File;
-strip_extension(File, Ext) when Ext == ".asn"; Ext == ".set"; Ext == ".asn1"->
- strip_extension(filename:rootname(File));
-strip_extension(File, _Ext) ->
- File.
-
hex2num(C) when $0 =< C, C =< $9 -> C - $0;
hex2num(C) when $A =< C, C =< $F -> C - $A + 10;
hex2num(C) when $a =< C, C =< $f -> C - $a + 10.