Skip to content

Commit c4b5e84

Browse files
authored
Merge pull request #39 from nalundgaard/export_json_map_remove_ifdef_test
Export 'json_map()' type, remove ifdef(TEST) logic
2 parents 1e688e3 + cb0aaaf commit c4b5e84

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed

rebar.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
{validate_app_modules, true}.
2525

26-
{profiles, [{test, [{erl_opts, [nowarn_export_all, debug_info]}]}]}.
26+
{profiles, [{test, [{erl_opts, [export_all, debug_info]}]}]}.
2727

2828
{cover_enabled, true}.
2929
{cover_opts, [verbose]}.

src/jsn.erl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,11 @@
3434
-export([as_map/1, from_map/1, from_map/2,
3535
as_proplist/1, from_proplist/1, from_proplist/2]).
3636

37-
-ifdef(TEST).
38-
-compile([export_all]).
39-
-endif.
40-
4137
%%==============================================================================
4238
%% types
4339
%%==============================================================================
4440

45-
-export_type([json_proplist/0, json_eep18/0, json_struct/0,
41+
-export_type([json_map/0, json_proplist/0, json_eep18/0, json_struct/0,
4642
json_object/0,
4743
json_term/0,
4844
path/0, paths/0,

test/jsn_tests.erl

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11

22
-module(jsn_tests).
33

4-
-ifdef(TEST).
5-
-compile([export_all]).
64
-include_lib("eunit/include/eunit.hrl").
75

86
-include("jsn.hrl").
@@ -1149,6 +1147,3 @@ binary_join_test_() ->
11491147
[?_assertEqual(<<"foo bar">>, jsn:binary_join([<<"foo">>,<<"bar">>], <<" ">>)),
11501148
?_assertEqual(<<"foo">>, jsn:binary_join([<<"foo">>], <<" ">>)),
11511149
?_assertEqual(<<>>, jsn:binary_join([], <<" ">>))].
1152-
1153-
1154-
-endif.

0 commit comments

Comments
 (0)