José Valim
278993ee0a
Improve ExUnit example with messages
2018-10-10 16:44:48 +02:00
José Valim
eb5e809f10
Show arguments in ExUnit reports for non-operator matches
...
This mirrors the behaviour seen in operators, where both
the left and right side are shown, except it has been
generalized to arguments:
foo = {1, 2, 3}
assert is_list(foo)
will show in error reports as:
1) test name (Module)
Expected truthy, got false
code: assert is_list(foo)
arguments:
# 1
{1, 2, 3}
stacktrace:
test/example_test.exs
This behaviour is always enabled, except for macros and
special forms, where rewriting the arguments may change the
macro behaviour.
A function Macro.special_form?/2 has also been added to
support this functionality.
2018-01-30 23:14:47 -02:00
José Valim
e0c112370e
Remove reporting behaviour in favor of upcoming improved assertions
2018-01-30 08:29:12 -02:00
José Valim
81770ad82e
Include assert/receive in code snippets
2017-05-31 17:12:53 +02:00
José Valim
07d40af48f
Add Exception.blame/3 and Exception.blame_mfa/3 ( #6127 )
2017-05-22 23:58:14 +02:00
José Valim
66624e72d2
Use red or green background for whitespace-only diffs ( #5476 )
2016-11-21 19:31:44 +01:00
Aleksei Magusev
510f009e67
Enhance difference highlighting for proper lists
2016-06-26 22:59:15 +02:00
Aleksei Magusev
96da837136
Emit warning when variable is being expanded to function call ( #3517 )
2016-06-11 22:31:03 +02:00
Aleksei Magusev
8994fc2a67
Enhance difference highlighting for keywords ( #4785 )
2016-06-08 00:15:43 +02:00
Aleksei Magusev
a20ff0b2b3
Make separated difference highlighting in ExUnit
2016-05-28 19:54:12 +02:00
Aleksei Magusev
14f17f803b
Add an example of inner difference for large strings
2016-05-28 15:17:09 +02:00
Aleksei Magusev
c0b0959e2e
Use longer strings difference example for whitespace highlighting
2016-05-27 17:12:35 +02:00
Louis Pilfold
d24a26380d
Show whitespace in ExUnit diffs ( #4689 )
2016-05-27 16:44:59 +02:00
José Valim
bdee464c0c
Do not emit diff for strings with bag difference > 0.6
2016-05-24 23:27:47 +02:00
José Valim
9cdf8743a0
Add capture log example to one of each
2016-05-17 09:44:40 +02:00
eksperimental
0aece49e2d
Replace 'char_list' and 'char list' with 'charlist'
2016-05-07 03:20:57 +07:00
Aleksei Magusev
14fe21a5b3
Consider improper lists in ExUnit.Diff.format/3 ( #4552 )
2016-04-26 23:16:31 +02:00
Aleksei Magusev
07d0896f29
Enhance difference highlighting for tuples ( #4505 )
2016-04-13 21:00:33 +02:00
Aleksei Magusev
6ee1928673
Inspect difference for strings
2016-04-10 16:30:46 +02:00
Aleksei Magusev
eed0298adb
Enhance difference highlighting for lists
2016-04-10 16:30:46 +02:00
Aleksei Magusev
d9ebcc3718
Add difference highlighting examples
2016-04-05 14:51:33 +02:00
José Valim
65d4a26a94
Use kind and stacktrace from each error in multi error
2015-11-27 22:10:09 +01:00
José Valim
5ff37dc1b9
Support tag reporting
2015-11-27 22:04:29 +01:00
José Valim
3ba93e780f
Support raising and formatting of errors in ExUnit
2015-11-27 18:03:54 +01:00
Andrea Leopardi
e4db37c1b0
Throw an error for -> with an empty right-hand side
2015-11-13 01:40:53 +01:00
eksperimental
61675c3ea8
Add space after comma: Format consistently
2015-03-17 22:55:27 +07:00
José Valim
82518c3376
Ensure doctests failures are properly tested
2014-05-23 16:35:05 +02:00
José Valim
ff04acd3a6
Update exit signals in Exception to {:EXIT, pid}
2014-05-12 12:35:43 +02:00
José Valim
56f15d9f4e
Do not add spaces after { and before }
...
This makes the source code consistent with the result
returned by inspect/2.
2014-04-21 19:06:35 +02:00
José Valim
832405c2cf
Ensure we properly raise on doctest failures
2014-04-21 11:17:02 +02:00
pragdave
897424b185
Spruce up the output format of ex_unit
...
Conflicts:
lib/ex_unit/lib/ex_unit/assertions.ex
2014-04-18 10:33:00 +02:00