Permalink
Browse files

Switch to using -DTEST to enable eunit tests (rebar compatible)

  • Loading branch information...
1 parent c450c75 commit 230fb3609ff7fab2b8bba4e8d829a578a46ca6c1 @Vagabond committed Nov 8, 2010
Showing with 5 additions and 5 deletions.
  1. +3 −3 Rakefile
  2. +2 −2 src/iconv.erl
View
@@ -96,7 +96,7 @@ rule ".beam" => ["%{ebin,src}X.erl"] + HEADERS do |t|
end
rule ".beam" => ["%{debug_ebin,src}X.erl"] + HEADERS do |t|
- sh "erlc +debug_info -D EUNIT -pa debug_ebin -W #{ERLC_FLAGS} -o debug_ebin #{t.source} "
+ sh "erlc +debug_info -D TEST -pa debug_ebin -W #{ERLC_FLAGS} -o debug_ebin #{t.source} "
end
rule ".rel" => ["%{ebin,src}X.rel.src"] do |t|
@@ -203,7 +203,7 @@ task :doc do
end
namespace :test do
- desc "Compile .beam files with -DEUNIT and +debug_info => debug_ebin"
+ desc "Compile .beam files with -DTEST and +debug_info => debug_ebin"
task :compile => [:contrib, 'debug_ebin'] + HEADERS + DEBUGOBJ + ['priv/iconv_drv.so']
task :contrib do
@@ -295,7 +295,7 @@ namespace :test do
# Add -DEUNIT=1 here to make dialyzer evaluate the code in the test cases. This generates some spurious warnings so
# it's not set normally but it can be very helpful occasionally.
dialyzer_flags = ""
- dialyzer_flags += " -DEUNIT=1" if ENV['dialyzer_debug']
+ dialyzer_flags += " -DTEST=1" if ENV['dialyzer_debug']
dialyzer_flags += " -Wunderspecs" if ENV['dialyzer_underspecced']
contribfiles = Dir['contrib**/*.erl'].join(' ')
dialyzer_output = `dialyzer -D#{OTPVERSION}=1 #{dialyzer_flags} --src -I include -c #{SRC.join(' ')} #{contribfiles}`
View
@@ -16,7 +16,7 @@
-record(state, {port}).
--ifdef(EUNIT).
+-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.
@@ -193,7 +193,7 @@ load_path(File) ->
l2b(L) when is_list(L) -> list_to_binary(L);
l2b(B) when is_binary(B) -> B.
--ifdef(EUNIT).
+-ifdef(TEST).
smtp_session_test_() ->
{setup,

0 comments on commit 230fb36

Please sign in to comment.