aboutsummaryrefslogtreecommitdiffstats
path: root/lib/eunit/include/eunit.hrl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-05-23 08:40:11 +0200
committerBjörn Gustavsson <[email protected]>2016-05-23 08:40:11 +0200
commitde114bb8523486c0174eb763b939fbdb34aa9421 (patch)
treed74d9716065ca85d8202d215bae1a5adf4750695 /lib/eunit/include/eunit.hrl
parentd20068c72361eac577d919514da0de9a34f07745 (diff)
parent10e106229b5a2006f2e7cf337a048859011f8798 (diff)
downloadotp-de114bb8523486c0174eb763b939fbdb34aa9421.tar.gz
otp-de114bb8523486c0174eb763b939fbdb34aa9421.tar.bz2
otp-de114bb8523486c0174eb763b939fbdb34aa9421.zip
Merge branch 'richcarl/eunit/debug-val-depth/PR-1061/OTP-13612'
* richcarl/eunit/debug-val-depth/PR-1061/OTP-13612: Replace suggested debugValAll/1 macro with debugVal/2
Diffstat (limited to 'lib/eunit/include/eunit.hrl')
-rw-r--r--lib/eunit/include/eunit.hrl16
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/eunit/include/eunit.hrl b/lib/eunit/include/eunit.hrl
index b6dbe2d706..7fd6c206a4 100644
--- a/lib/eunit/include/eunit.hrl
+++ b/lib/eunit/include/eunit.hrl
@@ -223,20 +223,18 @@
end).
-define(debugHere, (?debugMsg("<-"))).
-define(debugFmt(S, As), (?debugMsg(io_lib:format((S), (As))))).
--define(debugVal(E),
+-define(debugVal(E, D),
begin
((fun (__V) ->
- ?debugFmt(<<"~ts = ~tP">>, [(??E), __V, 15]),
- __V
- end)(E))
- end).
--define(debugValAll(E),
- begin
- ((fun (__V) ->
- ?debugFmt(<<"~ts = ~tp">>, [(??E), __V]),
+ ?debugFmt(<<"~ts = ~tP">>,
+ [(??E), __V, D]),
__V
end)(E))
end).
+-ifndef(EUNIT_DEBUG_VAL_DEPTH).
+-define(EUNIT_DEBUG_VAL_DEPTH, 15).
+-endif.
+-define(debugVal(E), ?debugVal(E, ?EUNIT_DEBUG_VAL_DEPTH)).
-define(debugTime(S, E),
begin
((fun () ->