From d58fc57ab4c07ebd07858c9f0c47facb450f6e2a Mon Sep 17 00:00:00 2001 From: alisdair sullivan Date: Mon, 23 Aug 2010 19:59:23 -0700 Subject: [PATCH] fixed eunit test macro definition --- rebar.config | 2 +- src/jsx_eep0018.erl | 4 ++-- src/jsx_format.erl | 4 ++-- src/jsx_test.erl | 6 +++--- src/jsx_verify.erl | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/rebar.config b/rebar.config index 557cb43..72fd678 100644 --- a/rebar.config +++ b/rebar.config @@ -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]}. diff --git a/src/jsx_eep0018.erl b/src/jsx_eep0018.erl index 682a199..c71c40a 100644 --- a/src/jsx_eep0018.erl +++ b/src/jsx_eep0018.erl @@ -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_() -> [ diff --git a/src/jsx_format.erl b/src/jsx_format.erl index 9d016b0..4fa0145 100644 --- a/src/jsx_format.erl +++ b/src/jsx_format.erl @@ -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_() -> [ diff --git a/src/jsx_test.erl b/src/jsx_test.erl index 76e2caf..92e258e 100644 --- a/src/jsx_test.erl +++ b/src/jsx_test.erl @@ -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. diff --git a/src/jsx_verify.erl b/src/jsx_verify.erl index 03b1fca..59ef574 100644 --- a/src/jsx_verify.erl +++ b/src/jsx_verify.erl @@ -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_() -> [