You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ko...@apache.org on 2015/06/30 17:37:54 UTC

[1/2] couch commit: updated refs/heads/master to 331f811

Repository: couchdb-couch
Updated Branches:
  refs/heads/master c2ef37211 -> 331f8110b


Add a convenience macro for "equal to" test

This macro preserves the expressiveness of ?assertEqual but uses ==
instead of =:=. Useful for situations where the test involves numbers
that may be converted between types (e.g. 1 == 1.0).


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/306d2e2d
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/306d2e2d
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/306d2e2d

Branch: refs/heads/master
Commit: 306d2e2df54fa9406adf1022c4d250040b90e42a
Parents: 04312dc
Author: Adam Kocoloski <ad...@cloudant.com>
Authored: Mon Jun 29 16:24:32 2015 -0400
Committer: Adam Kocoloski <ad...@cloudant.com>
Committed: Mon Jun 29 16:24:32 2015 -0400

----------------------------------------------------------------------
 include/couch_eunit.hrl | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/306d2e2d/include/couch_eunit.hrl
----------------------------------------------------------------------
diff --git a/include/couch_eunit.hrl b/include/couch_eunit.hrl
index bd37ef9..7c23b50 100644
--- a/include/couch_eunit.hrl
+++ b/include/couch_eunit.hrl
@@ -58,6 +58,23 @@
         lists:flatten(io_lib:format("~p~p~p", [A, B, C]))
     end).
 
+%% Like assertEqual, but using == instead of =:=
+-ifndef(assertEquiv).
+-define(assertEquiv(Expect, Expr),
+	((fun (__X) ->
+        case (Expr) of
+        __V when __V == __X -> ok;
+        __Y -> erlang:error({assertEquiv_failed,
+				      [{module, ?MODULE},
+				       {line, ?LINE},
+				       {expression, (??Expr)},
+				       {expected, __X},
+				       {value, __Y}]})
+	    end
+	  end)(Expect))).
+-endif.
+-define(_assertEquiv(Expect, Expr), ?_test(?assertEquiv(Expect, Expr))).
+
 %% Borrowed from https://github.com/richcarl/eunit/blob/master/include/eunit.hrl#L200-L219
 %% TODO: get rid of this once R14* is no longer supported
 -ifndef(assertNotMatch).


[2/2] couch commit: updated refs/heads/master to 331f811

Posted by ko...@apache.org.
Merge branch '1805-reduce-collation'

COUCHDB-1805


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/331f8110
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/331f8110
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/331f8110

Branch: refs/heads/master
Commit: 331f8110b5026df38df59db26a1a614fb7251574
Parents: c2ef372 306d2e2
Author: Adam Kocoloski <ad...@cloudant.com>
Authored: Tue Jun 30 11:37:35 2015 -0400
Committer: Adam Kocoloski <ad...@cloudant.com>
Committed: Tue Jun 30 11:37:35 2015 -0400

----------------------------------------------------------------------
 include/couch_eunit.hrl | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------