fix up tests to reflect the actual NOTEST variable DEV_ONLY
This commit is contained in:
parent
4973a0fb8f
commit
16b441f0e3
10 changed files with 23 additions and 25 deletions
|
@ -227,7 +227,7 @@ colorize_(Color, Bold, Msg) when is_integer(Color), is_integer(Bold)->
|
|||
%%% Test Functions
|
||||
%%%===================================================================
|
||||
|
||||
-ifndef(NOTEST).
|
||||
-ifdef(DEV_ONLY).
|
||||
-include_lib("eunit/include/eunit.hrl").
|
||||
|
||||
should_test() ->
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
is_true/1,
|
||||
is_false/1]).
|
||||
|
||||
-ifndef(NOTEST).
|
||||
-ifdef(DEV_ONLY).
|
||||
-include_lib("proper/include/proper.hrl").
|
||||
-endif.
|
||||
|
||||
|
@ -218,10 +218,10 @@ to_atom(X) ->
|
|||
to_atom(to_list(X)).
|
||||
|
||||
%%%===================================================================
|
||||
%%% API
|
||||
%%% Tests
|
||||
%%%===================================================================
|
||||
|
||||
-ifndef(NOTEST).
|
||||
-ifdef(DEV_ONLY).
|
||||
-include_lib("eunit/include/eunit.hrl").
|
||||
|
||||
force_proper_test_() ->
|
||||
|
|
|
@ -671,14 +671,14 @@ pad2(X) when is_float(X) ->
|
|||
ltoi(X) ->
|
||||
list_to_integer(X).
|
||||
|
||||
%%
|
||||
%% TEST FUNCTIONS
|
||||
%%
|
||||
%% c(dh_date,[{d,'TEST'}]).
|
||||
%%-define(NOTEST, 1).
|
||||
%%%===================================================================
|
||||
%%% Tests
|
||||
%%%===================================================================
|
||||
|
||||
-ifdef(DEV_ONLY).
|
||||
-include_lib("eunit/include/eunit.hrl").
|
||||
|
||||
|
||||
-define(DATE, {{2001,3,10},{17,16,17}}).
|
||||
-define(DATEMS, {{2001,3,10},{17,16,17,123456}}).
|
||||
-define(DATE_NOON, {{2001,3,10},{12,0,0}}).
|
||||
|
@ -938,3 +938,4 @@ zulu_test_() ->
|
|||
?_assertEqual(format("Y-m-d\\TH:i:s",nparse("2001-03-10T15:16:17-04:00")),
|
||||
"2001-03-10T19:16:17")
|
||||
].
|
||||
-endif.
|
||||
|
|
|
@ -298,7 +298,7 @@ sub_files(From) ->
|
|||
%%% Test Functions
|
||||
%%%===================================================================
|
||||
|
||||
-ifndef(NOTEST).
|
||||
-ifdef(DEV_ONLY).
|
||||
-include_lib("eunit/include/eunit.hrl").
|
||||
|
||||
setup_test() ->
|
||||
|
|
|
@ -154,7 +154,7 @@ keys(Data) ->
|
|||
%%%===================================================================
|
||||
|
||||
|
||||
-ifndef(NOTEST).
|
||||
-ifdef(DEV_ONLY).
|
||||
-include_lib("eunit/include/eunit.hrl").
|
||||
|
||||
%% For me unit testing initially is about covering the obvious case. A
|
||||
|
|
|
@ -68,7 +68,7 @@ fetch(Fun, List) when is_list(List), is_function(Fun) ->
|
|||
%%% Test Functions
|
||||
%%%===================================================================
|
||||
|
||||
-ifndef(NOTEST).
|
||||
-ifdef(DEV_ONLY).
|
||||
-include_lib("eunit/include/eunit.hrl").
|
||||
|
||||
find1_test() ->
|
||||
|
|
|
@ -314,7 +314,7 @@ internal_pes(Vsn, LVsn) ->
|
|||
%%% Test Functions
|
||||
%%%===================================================================
|
||||
|
||||
-ifndef(NOTEST).
|
||||
-ifdef(DEV_ONLY).
|
||||
-include_lib("eunit/include/eunit.hrl").
|
||||
|
||||
eql_test() ->
|
||||
|
|
|
@ -43,8 +43,6 @@
|
|||
type/0,
|
||||
supported/0]).
|
||||
|
||||
-include_lib("eunit/include/eunit.hrl").
|
||||
|
||||
%%============================================================================
|
||||
%% Types
|
||||
%%============================================================================
|
||||
|
@ -202,6 +200,9 @@ get_string(String) ->
|
|||
%%%====================================================================
|
||||
%%% tests
|
||||
%%%====================================================================
|
||||
-ifdef(DEV_ONLY).
|
||||
-include_lib("eunit/include/eunit.hrl").
|
||||
|
||||
general_test_() ->
|
||||
[?_test(42 == get_integer("42")),
|
||||
?_test(500211 == get_integer("500211")),
|
||||
|
@ -216,3 +217,5 @@ general_test_() ->
|
|||
?_test(false == get_boolean("False")),
|
||||
?_test(false == get_boolean("No")),
|
||||
?_test(false == get_boolean("no"))].
|
||||
|
||||
-endif.
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
%%% @copyright Erlware, LLC.
|
||||
-module(ec_plists_tests).
|
||||
|
||||
-ifdef(DEV_ONLY).
|
||||
|
||||
-include_lib("eunit/include/eunit.hrl").
|
||||
|
||||
%%%===================================================================
|
||||
|
@ -73,3 +75,5 @@ ftmap_bad_test() ->
|
|||
lists:seq(1, 5)),
|
||||
?assertMatch([{value, 1}, {error,{throw,test_exception}}, {value, 3},
|
||||
{value, 4}, {value, 5}] , Results).
|
||||
|
||||
-endif.
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
-module(mock).
|
||||
|
||||
-export([new_dictionary/0]).
|
||||
|
||||
new_dictionary() ->
|
||||
meck:new(ec_dictionary_proper),
|
||||
meck:expect(ec_dictionary_proper, dictionary, fun() ->
|
||||
proper_types:union([ec_dict])
|
||||
end).
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue