You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ch...@apache.org on 2015/06/02 21:36:02 UTC

[31/50] couch commit: updated refs/heads/2080-port-cors-to-chttpd to 529339b

Temporarily add ?assertNotEqual eunit macro for R14*


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

Branch: refs/heads/2080-port-cors-to-chttpd
Commit: 2f615dae1c59a12125470b17c82b123b1cf8361e
Parents: 7776921
Author: Alexander Shorin <kx...@apache.org>
Authored: Sun Apr 5 02:33:06 2015 +0300
Committer: Alexander Shorin <kx...@apache.org>
Committed: Sun Apr 5 02:33:06 2015 +0300

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


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/2f615dae/include/couch_eunit.hrl
----------------------------------------------------------------------
diff --git a/include/couch_eunit.hrl b/include/couch_eunit.hrl
index 390f03a..bd37ef9 100644
--- a/include/couch_eunit.hrl
+++ b/include/couch_eunit.hrl
@@ -77,3 +77,20 @@
         end)())
     end).
 -endif.
+-ifndef(assertNotEqual).
+-define(assertNotEqual(Unexpected, Expr),
+    begin
+    ((fun (__X) ->
+        case (Expr) of
+        __X -> erlang:error({assertNotEqual_failed,
+                     [{module, ?MODULE},
+                      {line, ?LINE},
+                      {expression, (??Expr)},
+                      {value, __X}]});
+        _ -> ok
+        end
+      end)(Unexpected))
+    end).
+-define(_assertNotEqual(Unexpected, Expr),
+    ?_test(?assertNotEqual(Unexpected, Expr))).
+-endif.