José Valim
edb09a3440
Improve ExUnit example with messages
2018-10-10 16:44:48 +02:00
José Valim
d0fd133e79
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
0b8d077663
Remove reporting behaviour in favor of upcoming improved assertions
2018-01-30 08:29:12 -02:00
José Valim
c2dace7bb1
Include assert/receive in code snippets
2017-05-31 17:12:53 +02:00
José Valim
df1b084508
Add Exception.blame/3 and Exception.blame_mfa/3 ( #6127 )
2017-05-22 23:58:14 +02:00
José Valim
64e60081d0
Use red or green background for whitespace-only diffs ( #5476 )
2016-11-21 19:31:44 +01:00
Aleksei Magusev
2a4323ca34
Enhance difference highlighting for proper lists
2016-06-26 22:59:15 +02:00
Aleksei Magusev
b86b8ca335
Emit warning when variable is being expanded to function call ( #3517 )
2016-06-11 22:31:03 +02:00
Aleksei Magusev
d6a58f79e5
Enhance difference highlighting for keywords ( #4785 )
2016-06-08 00:15:43 +02:00
Aleksei Magusev
7deffb46f6
Make separated difference highlighting in ExUnit
2016-05-28 19:54:12 +02:00
Aleksei Magusev
ad900d90c7
Add an example of inner difference for large strings
2016-05-28 15:17:09 +02:00
Aleksei Magusev
6219fe6d85
Use longer strings difference example for whitespace highlighting
2016-05-27 17:12:35 +02:00
Louis Pilfold
6dc47710c9
Show whitespace in ExUnit diffs ( #4689 )
2016-05-27 16:44:59 +02:00
José Valim
2c7fd1edf1
Do not emit diff for strings with bag difference > 0.6
2016-05-24 23:27:47 +02:00
José Valim
caebc31e6a
Add capture log example to one of each
2016-05-17 09:44:40 +02:00
eksperimental
c3d28f76f2
Replace 'char_list' and 'char list' with 'charlist'
2016-05-07 03:20:57 +07:00
Aleksei Magusev
b7c7bdebd9
Consider improper lists in ExUnit.Diff.format/3 ( #4552 )
2016-04-26 23:16:31 +02:00
Aleksei Magusev
7123e238f4
Enhance difference highlighting for tuples ( #4505 )
2016-04-13 21:00:33 +02:00
Aleksei Magusev
e238e9311f
Inspect difference for strings
2016-04-10 16:30:46 +02:00
Aleksei Magusev
189cf8d684
Enhance difference highlighting for lists
2016-04-10 16:30:46 +02:00
Aleksei Magusev
b6d77f2a12
Add difference highlighting examples
2016-04-05 14:51:33 +02:00
José Valim
4d147eb021
Use kind and stacktrace from each error in multi error
2015-11-27 22:10:09 +01:00
José Valim
09979c7379
Support tag reporting
2015-11-27 22:04:29 +01:00
José Valim
67b006af07
Support raising and formatting of errors in ExUnit
2015-11-27 18:03:54 +01:00
Andrea Leopardi
d999d82f95
Throw an error for -> with an empty right-hand side
2015-11-13 01:40:53 +01:00
eksperimental
f9bcdd5c1c
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