Skip to content

Commit

Permalink
Include the eunit file only if TEST is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
essen committed Sep 17, 2012
1 parent 183bf7f commit 13b743b
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cowboy_clock.erl
Expand Up @@ -44,7 +44,9 @@
-define(SERVER, ?MODULE).
-define(TABLE, ?MODULE).

-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.

%% API.

Expand Down
2 changes: 2 additions & 0 deletions src/cowboy_cookies.erl
Expand Up @@ -36,7 +36,9 @@

-define(QUOTE, $\").

-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.

%% API.

Expand Down
2 changes: 2 additions & 0 deletions src/cowboy_dispatcher.erl
Expand Up @@ -32,7 +32,9 @@
-export_type([tokens/0]).
-export_type([dispatch_rules/0]).

-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.

%% API.

Expand Down
2 changes: 2 additions & 0 deletions src/cowboy_http.erl
Expand Up @@ -80,7 +80,9 @@
-export_type([headers/0]).
-export_type([status/0]).

-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.

%% Parsing.

Expand Down
2 changes: 2 additions & 0 deletions src/cowboy_multipart.erl
Expand Up @@ -30,7 +30,9 @@
-type end_of_part() :: {end_of_part, cont(more(part_result()))}.
-type disposition() :: {binary(), [{binary(), binary()}]}.

-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.

%% API.

Expand Down
2 changes: 2 additions & 0 deletions src/cowboy_protocol.erl
Expand Up @@ -42,7 +42,9 @@
-export([parse_request/1]).
-export([handler_loop/3]).

-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.

-record(state, {
listener :: pid(),
Expand Down
2 changes: 2 additions & 0 deletions src/cowboy_req.erl
Expand Up @@ -118,7 +118,9 @@
-export([to_list/1]).
-export([transport/1]).

-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.

-record(http_req, {
%% Transport.
Expand Down

0 comments on commit 13b743b

Please sign in to comment.