0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 20:30:23 +00:00

Include the eunit file only if TEST is defined

This commit is contained in:
Loïc Hoguin 2012-09-17 11:41:08 +02:00
parent 183bf7f143
commit 13b743ba26
7 changed files with 14 additions and 0 deletions

View file

@ -44,7 +44,9 @@
-define(SERVER, ?MODULE).
-define(TABLE, ?MODULE).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.
%% API.

View file

@ -36,7 +36,9 @@
-define(QUOTE, $\").
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.
%% API.

View file

@ -32,7 +32,9 @@
-export_type([tokens/0]).
-export_type([dispatch_rules/0]).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.
%% API.

View file

@ -80,7 +80,9 @@
-export_type([headers/0]).
-export_type([status/0]).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.
%% Parsing.

View file

@ -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.

View file

@ -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(),

View file

@ -118,7 +118,9 @@
-export([to_list/1]).
-export([transport/1]).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.
-record(http_req, {
%% Transport.