Skip to content
This repository was archived by the owner on Dec 17, 2024. It is now read-only.

Commit 163eda0

Browse files
committed
Exclude eunit from production builds
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
1 parent 5bce9df commit 163eda0

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

src/hyper_binary.erl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
%% inserts to perform in the future.
66

77
-module(hyper_binary).
8-
-include_lib("eunit/include/eunit.hrl").
98
-behaviour(hyper_register).
109
%%-compile(native).
1110

@@ -275,6 +274,8 @@ merge_buf(B, [{Index, Value} | Rest], PrevIndex, Acc) ->
275274
%% TESTS
276275
%%
277276

277+
-ifdef(EUNIT).
278+
-include_lib("eunit/include/eunit.hrl").
278279

279280
merge_test() ->
280281
P = 4, M = m(P),
@@ -316,3 +317,5 @@ serialize_test() ->
316317

317318
max_registers_test() ->
318319
?assertEqual([{3, 3}], max_registers([{3, 1}, {3, 2}, {3, 3}])).
320+
321+
-endif(EUNIT).

src/hyper_binary_rle.erl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
-module(hyper_binary_rle).
2-
-include_lib("eunit/include/eunit.hrl").
32

43
-export([new/1, set/3, compact/1, max_merge/1, max_merge/2,
54
reduce_precision/2, bytes/1]).
@@ -199,6 +198,9 @@ take_repeat(<<Repeats:?REPEAT, Value:?VALUE, Rest/binary>>) ->
199198
%% TESTS
200199
%%
201200

201+
-ifdef(EUNIT).
202+
-include_lib("eunit/include/eunit.hrl").
203+
202204
format({rle, <<?MARKER, B/binary>>}) ->
203205
rle_to_list(B).
204206

@@ -303,3 +305,4 @@ proper_test_() ->
303305

304306

305307

308+
-endif(EUNIT).

src/hyper_gb.erl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
-module(hyper_gb).
2-
-include_lib("eunit/include/eunit.hrl").
32

43
-behaviour(hyper_register).
54
-export([new/1,
@@ -118,6 +117,9 @@ do_decode_registers(<<Value:8/integer, Rest/binary>>, I) ->
118117
%% TESTS
119118
%%
120119

120+
-ifdef(EUNIT).
121+
-include_lib("eunit/include/eunit.hrl").
122+
121123
sum_test() ->
122124
T = set(3, 5, set(1, 1, new(4))),
123125

@@ -145,3 +147,5 @@ zero_test() ->
145147
P = 4, M = 16,
146148
T = set(3, 5, set(1, 1, new(P))),
147149
?assertEqual(M - 2, zero_count(T)).
150+
151+
-endif(EUNIT).

0 commit comments

Comments
 (0)