diff options
author | Yuki Ito <[email protected]> | 2016-04-23 02:55:39 +0900 |
---|---|---|
committer | Yuki Ito <[email protected]> | 2016-04-23 02:55:39 +0900 |
commit | d6f5a1d972b76335613ac4ec83d8de8ca1aa7260 (patch) | |
tree | d39f1ea04c3a2c1d5eaafff5c8111f4deb8cee6b /lib/eunit/include/eunit.hrl | |
parent | f2cef11a16d8d5f643cdf913b46042db71bff867 (diff) | |
download | otp-d6f5a1d972b76335613ac4ec83d8de8ca1aa7260.tar.gz otp-d6f5a1d972b76335613ac4ec83d8de8ca1aa7260.tar.bz2 otp-d6f5a1d972b76335613ac4ec83d8de8ca1aa7260.zip |
eunit: Add ?debugValAll macro
Add a macro which works much like ?debugVal, but doesn't truncate terms to
print.
Diffstat (limited to 'lib/eunit/include/eunit.hrl')
-rw-r--r-- | lib/eunit/include/eunit.hrl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/eunit/include/eunit.hrl b/lib/eunit/include/eunit.hrl index 8f678b0290..b6dbe2d706 100644 --- a/lib/eunit/include/eunit.hrl +++ b/lib/eunit/include/eunit.hrl @@ -212,6 +212,7 @@ -define(debugHere, ok). -define(debugFmt(S, As), ok). -define(debugVal(E), (E)). +-define(debugValAll(E), (E)). -define(debugTime(S, E), (E)). -else. -define(debugMsg(S), @@ -229,6 +230,13 @@ __V end)(E)) end). +-define(debugValAll(E), + begin + ((fun (__V) -> + ?debugFmt(<<"~ts = ~tp">>, [(??E), __V]), + __V + end)(E)) + end). -define(debugTime(S, E), begin ((fun () -> |