fixed eunit test macro definition

This commit is contained in:
alisdair sullivan 2010-08-23 19:59:23 -07:00
parent 4d8246dcdc
commit d58fc57ab4
5 changed files with 10 additions and 10 deletions

View file

@ -1,6 +1,6 @@
%% edit eunit_test_path if you want to run your own tests, use "../" not "./" as
%% rebar changes to working dir to .eunit when running tests
{eunit_compile_opts, [{d, test}, {d, eunit_test_path, "../test/cases"}]}.
{eunit_compile_opts, [{d, eunit_test_path, "../test/cases"}]}.
%% uncomment to get verbose output from test suite
%% {eunit_opts, [verbose]}.

View file

@ -35,7 +35,7 @@
-include("./include/jsx_eep0018.hrl").
-ifdef(test).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.
@ -400,7 +400,7 @@ to_hex(X) -> X + $0.
%% eunit tests
-ifdef(test).
-ifdef(TEST).
decode_test_() ->
[

View file

@ -35,7 +35,7 @@
-include("./include/jsx_format.hrl").
-ifdef(test).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.
@ -158,7 +158,7 @@ space(Opts) ->
%% eunit tests
-ifdef(test).
-ifdef(TEST).
minify_test_() ->
[

View file

@ -29,19 +29,19 @@
-author("alisdairsullivan@yahoo.ca").
-ifndef(test).
-ifndef(TEST).
-export([test/0]).
-endif.
-ifdef(test).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.
%% if not compiled with test support
-ifndef(test).
-ifndef(TEST).
test() -> erlang:error(notest).
-else.

View file

@ -35,7 +35,7 @@
-include("./include/jsx_verify.hrl").
-ifdef(test).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.
@ -93,7 +93,7 @@ collect(_, _) ->
%% eunit tests
-ifdef(test).
-ifdef(TEST).
true_test_() ->
[