aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2012-09-17 11:41:08 +0200
committerLoïc Hoguin <[email protected]>2012-09-17 13:57:29 +0200
commit13b743ba2635f7a3f57f5f8a7445ea243aed04d2 (patch)
treebc82858d7e40316e02452d0929f1a5ae6e8af580 /src
parent183bf7f1439773b62f417a817cebfb194ef28d35 (diff)
downloadcowboy-13b743ba2635f7a3f57f5f8a7445ea243aed04d2.tar.gz
cowboy-13b743ba2635f7a3f57f5f8a7445ea243aed04d2.tar.bz2
cowboy-13b743ba2635f7a3f57f5f8a7445ea243aed04d2.zip
Include the eunit file only if TEST is defined
Diffstat (limited to 'src')
-rw-r--r--src/cowboy_clock.erl2
-rw-r--r--src/cowboy_cookies.erl2
-rw-r--r--src/cowboy_dispatcher.erl2
-rw-r--r--src/cowboy_http.erl2
-rw-r--r--src/cowboy_multipart.erl2
-rw-r--r--src/cowboy_protocol.erl2
-rw-r--r--src/cowboy_req.erl2
7 files changed, 14 insertions, 0 deletions
diff --git a/src/cowboy_clock.erl b/src/cowboy_clock.erl
index e29b640..747bffe 100644
--- a/src/cowboy_clock.erl
+++ b/src/cowboy_clock.erl
@@ -44,7 +44,9 @@
-define(SERVER, ?MODULE).
-define(TABLE, ?MODULE).
+-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
+-endif.
%% API.
diff --git a/src/cowboy_cookies.erl b/src/cowboy_cookies.erl
index 4accf14..d10c848 100644
--- a/src/cowboy_cookies.erl
+++ b/src/cowboy_cookies.erl
@@ -36,7 +36,9 @@
-define(QUOTE, $\").
+-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
+-endif.
%% API.
diff --git a/src/cowboy_dispatcher.erl b/src/cowboy_dispatcher.erl
index e0f121e..445e8fa 100644
--- a/src/cowboy_dispatcher.erl
+++ b/src/cowboy_dispatcher.erl
@@ -32,7 +32,9 @@
-export_type([tokens/0]).
-export_type([dispatch_rules/0]).
+-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
+-endif.
%% API.
diff --git a/src/cowboy_http.erl b/src/cowboy_http.erl
index 7ad3d2f..aea71c1 100644
--- a/src/cowboy_http.erl
+++ b/src/cowboy_http.erl
@@ -80,7 +80,9 @@
-export_type([headers/0]).
-export_type([status/0]).
+-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
+-endif.
%% Parsing.
diff --git a/src/cowboy_multipart.erl b/src/cowboy_multipart.erl
index 26ea84f..4040073 100644
--- a/src/cowboy_multipart.erl
+++ b/src/cowboy_multipart.erl
@@ -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.
diff --git a/src/cowboy_protocol.erl b/src/cowboy_protocol.erl
index d2f97a7..8020b31 100644
--- a/src/cowboy_protocol.erl
+++ b/src/cowboy_protocol.erl
@@ -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(),
diff --git a/src/cowboy_req.erl b/src/cowboy_req.erl
index 3c81254..e9cb6b5 100644
--- a/src/cowboy_req.erl
+++ b/src/cowboy_req.erl
@@ -118,7 +118,9 @@
-export([to_list/1]).
-export([transport/1]).
+-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
+-endif.
-record(http_req, {
%% Transport.