Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8DBD411E00 for ; Thu, 31 Jul 2014 21:30:58 +0000 (UTC) Received: (qmail 88153 invoked by uid 500); 31 Jul 2014 21:30:56 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 87950 invoked by uid 500); 31 Jul 2014 21:30:56 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 86974 invoked by uid 99); 31 Jul 2014 21:30:56 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Jul 2014 21:30:56 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 02F0B951A63; Thu, 31 Jul 2014 21:30:56 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: davisp@apache.org To: commits@couchdb.apache.org Date: Thu, 31 Jul 2014 21:31:20 -0000 Message-Id: <093c4b94b1a74f0c8d5858d1ea3f9c5b@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [26/50] meck commit: updated refs/heads/master to dde7590 Make test pass on R16B03+ Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/c6bcda61 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/c6bcda61 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/c6bcda61 Branch: refs/heads/master Commit: c6bcda61252d5e7578995024acf3fa2ba0ef9c2c Parents: 7e4bcc4 Author: Adam Lindberg Authored: Fri Mar 14 14:31:14 2014 +0100 Committer: Adam Lindberg Committed: Fri Mar 14 14:31:14 2014 +0100 ---------------------------------------------------------------------- rebar.config | 6 +++++- test/meck_tests.erl | 9 ++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/c6bcda61/rebar.config ---------------------------------------------------------------------- diff --git a/rebar.config b/rebar.config index 7a5569e..1eab0d2 100644 --- a/rebar.config +++ b/rebar.config @@ -1,5 +1,9 @@ %% Compiler Options =========================================================== -{erl_opts, [warnings_as_errors, debug_info]}. +{erl_opts, [ + warnings_as_errors, + debug_info, + {platform_define, "(R14|R15|R16(?!B03))", cover_squash_comiple_opts} +]}. %% Misc ======================================================================= {clean_files, [".eunit", "ebin/*.beam", "test/*.beam"]}. http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/c6bcda61/test/meck_tests.erl ---------------------------------------------------------------------- diff --git a/test/meck_tests.erl b/test/meck_tests.erl index 901ab84..4168a6c 100644 --- a/test/meck_tests.erl +++ b/test/meck_tests.erl @@ -986,6 +986,12 @@ cover_options_({_OldPath, Src, Module}) -> % 2 instead of 3, as above ?assertEqual({ok, {Module, {2,0}}}, cover:analyze(Module, module)). +-ifdef(cover_squash_compile_opts). +-define(copts, []). +-else. +-define(copts, [{i,"../test/include"},{d,'TEST',true}]). +-endif. + cover_options_fail_({_OldPath, Src, Module}) -> %% This may look like the test above but there is a subtle %% difference. When `cover:compile_beam' is called it squashes @@ -997,7 +1003,8 @@ cover_options_fail_({_OldPath, Src, Module}) -> {ok, _} = compile:file(Src, CompilerOptions), ?assertEqual(CompilerOptions, meck_code:compile_options(Module)), {ok, _} = cover:compile_beam(Module), - ?assertEqual([], meck_code:compile_options(Module)), + io:format(user, "Copts: ~p~n", [?copts]), + ?assertEqual(?copts, meck_code:compile_options(Module)), a = Module:a(), b = Module:b(), {1, 2} = Module:c(1, 2),