Skip to content
This repository
Browse code

Guard all unguarded eunit includes

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
  • Loading branch information...
commit d06850026668f6d1782d4992e4026d0d338895a9 1 parent 44df8a2
Peter Lemenkov authored June 11, 2012
7  src/merkerl.erl
@@ -50,8 +50,6 @@
50 50
 -module(merkerl).
51 51
 -export([insert/2,delete/2,build_tree/1,diff/2,allkeys/1]).
52 52
 
53  
--include_lib("eunit/include/eunit.hrl").
54  
-
55 53
 % TODO: fix doc, userdata is the ONLY user-exposed key
56 54
 -record(merk, {nodetype,           % atom: expected values are 'leaf' or 'inner'
57 55
                key=undefined,      % if nodetype=leaf, then this is binary/160
@@ -328,6 +326,9 @@ getkids(Tree) ->
328 326
 sha(X) ->
329 327
     crypto:sha(term_to_binary(X)).
330 328
 
  329
+-ifdef(TEST).
  330
+-include_lib("eunit/include/eunit.hrl").
  331
+
331 332
 % @spec merkle_test() -> bool()
332 333
 % @doc A test function and example code.
333 334
 %
@@ -365,4 +366,4 @@ merkle_test() ->
365 366
     I2 = build_tree(I),
366 367
     ?assertEqual(2, length(allkeys(I2))).
367 368
 
368  
-
  369
+-endif.
3  src/riak_core_dtrace.erl
@@ -40,8 +40,6 @@
40 40
 
41 41
 -module(riak_core_dtrace).
42 42
 
43  
--include_lib("eunit/include/eunit.hrl").
44  
-
45 43
 -export([dtrace/1, dtrace/3, dtrace/4, dtrace/6]).
46 44
 -export([enabled/0, put_tag/1]).
47 45
 -export([timeit0/1, timeit_mg/1, timeit_best/1]).   % debugging/testing only
@@ -187,6 +185,7 @@ timeit_best(ArgList) ->
187 185
     dtrace(ArgList).
188 186
 
189 187
 -ifdef(TEST).
  188
+-include_lib("eunit/include/eunit.hrl").
190 189
 
191 190
 timeit_naive_test() ->
192 191
     test_common("timeit_naive",

0 notes on commit d068500

Please sign in to comment.
Something went wrong with that request. Please try again.