José Valim
d311e10bea
Change HashDict implementation to use tries with compound nodes
...
The new implementation is basically a tree of tuples (tries) but
they allow compond nodes (a node with a key-value pair and a
sub-tree). This removes the need for node-expansion and also simplifies
the design structure to not require multiple stages nor buckets.
The end result is a faster HashDict implementation (about 10% faster
on access, 30% on updates), which is still small for small dicts
but about 30% bigger for large dicts (in terms of memory) and with
a much simpler implementation.
2014-01-19 13:58:45 +01:00
José Valim
adf7834529
Ensure ExUnit doesn't hang on linked failures
...
Thanks to @pminten for reporting this issue.
2014-01-18 19:41:19 +01:00
José Valim
5a2e838def
Deprecate <-/2 in favor of send/2
2014-01-14 18:27:41 +01:00
José Valim
0aff2a3139
Compile with relative paths and include apps in stacktraces
...
Closes #1964 , closes #1861
2014-01-07 11:30:44 +01:00
José Valim
84cc7d5eb0
Only run setup_all if there are tests in the case
2014-01-05 17:38:21 +01:00
José Valim
1ee1a3f687
Support @moduletag in ExUnit
2014-01-05 12:24:37 +01:00
José Valim
05c6f9f822
include in ExUnit only has effect after an exclude
2014-01-05 12:08:08 +01:00
José Valim
5e2ea082d1
Deprecate __FILE__ in favor of __DIR__ or __ENV__.file
2014-01-02 18:10:59 +01:00
Eric Meadows-Jonsson
f67022267f
Reset tags for every test
2013-12-31 20:25:32 +01:00
José Valim
9c9d8e855e
Merge pull request #1943 from ericmj/doctest-inspect
...
Add raw string compare in doctests for #Module<...>
2013-12-31 08:39:26 -08:00
José Valim
9afc1043c9
Move filters functionality to ExUnit.Filters
2013-12-31 17:31:20 +01:00
Eric Meadows-Jonsson
afb7efd11b
Add raw string compare in doctests for #Module<...>
...
Will now do raw string compare for doctests of #Module<...> format:
iex> HashDict.new a: 0, b: 1, c: 2
#HashDict<[a: 0, b: 1, c: 2]>
2013-12-18 15:52:23 +01:00
vanstee
0bd45a090a
Display include and exclude filters separately
2013-12-17 01:39:55 -05:00
vanstee
f0456b6377
Refactor filter evaluation
...
Thanks for the help @josevalim and @christhekeele
2013-12-17 00:05:03 -05:00
vanstee
c7da787265
Support separate inclusion and exclusion filters
2013-12-15 21:12:27 -05:00
vanstee
eab8b46879
Support filters for multiple tags
2013-12-14 13:34:38 -05:00
vanstee
04623a6edf
Always run tests without matching tags
2013-12-03 02:35:11 -05:00
vanstee
5d7a1cf7a0
Support exclusion of any tag key-value pair
2013-12-03 01:35:51 -05:00
vanstee
4e29f274c5
Move filter parsing logic to a more testable place
2013-12-02 20:28:25 -05:00
vanstee
73253206f2
Add helper function to format filters
2013-12-01 17:34:44 -05:00
vanstee
90f9162e3f
Write test exercising case filtering
2013-12-01 17:34:44 -05:00
José Valim
d3055a9d2a
Store tags in context, remove records from context
2013-11-27 13:03:38 +01:00
José Valim
5263610aac
Move test outcome to an explicit state
2013-11-27 10:34:46 +01:00
José Valim
5d53abc5ff
Support ExUnit tags for customizing tests in callbacks
2013-11-27 09:38:53 +01:00
José Valim
fc0af0542b
Improve doctest stripping, closes #1678
2013-09-11 11:34:12 -03:00
José Valim
b39a5d8632
Deprecate %b and %B in favor of %s and %S
2013-09-03 13:14:13 -03:00
José Valim
820d0cb9a0
Print failures for ExUnit as soon as they come
2013-08-22 11:12:18 +02:00
José Valim
a86288f5e3
Merge pull request #1597 from thmzlt/doctest_indent
...
Improve DocTest indentation handling
2013-08-14 23:51:17 -07:00
José Valim
db47bd56b4
Add Path.relative_to_cwd and rely on it when generating stacktraces
2013-08-14 12:36:54 +02:00
Thomaz Leite
e4d679c039
Add "too much" and "not enough" tests to DocTest
2013-08-13 23:13:45 -07:00
Thomaz Leite
649536fc61
Add mismatched indentation test to DocTest
2013-08-13 23:13:45 -07:00
Thomaz Leite
bdf7bc5e6c
Add heredocs indentation test to DocTest
2013-08-13 23:13:45 -07:00
José Valim
9cd6b528c9
Get rid of unmatched docs warnings
2013-07-23 23:37:37 +02:00
José Valim
accf7dac82
Change inspect formatting to use spaces in between ,
2013-07-06 10:07:54 +02:00
José Valim
acf912c2c8
Clean up ExUnit.CaseTemplate to allow composition
2013-07-03 21:29:35 +02:00
José Valim
cdd8e5862d
Rename the ExUnit option from debug to trace
2013-07-01 16:41:34 +02:00
José Valim
3bac4ddec6
Support --debug on internal tests which are not run through mix
2013-07-01 14:20:33 +02:00
José Valim
595d343e05
Refactor and improve coverage of ExUnit formatters
2013-07-01 13:18:26 +02:00
José Valim
6cee8572e0
Clean up ExUnit tests
2013-06-21 15:16:02 +02:00
vanstee
f2d9e802cd
Include description and improve formatting
...
Switching from `AssertionError` to `ExpectationError` gives us a nicer
error message and allows us to easily include the incorrect result as a
description.
Fixes #1276
Signed-off-by: José Valim <jose.valim@plataformatec.com.br >
2013-06-21 15:08:48 +02:00
vanstee
561d6ea0d1
Show original statement if assert or refute fails
...
If the asserted statement evaluates to false, show the unevaluated
statement in the assertion error output message for more context about
the failure. Refute also now follows similar semantics.
Fixes #1276
2013-06-20 16:17:55 -04:00
Rafael Mendonça França
7cdc25538e
Uniform use of whitespace after commas on codebase
...
This make easier to read and also follow some standard in the code
2013-06-15 16:52:48 -03:00
Alexei Sholik
4a1dfccbec
Use =~ with strings where it makes sense
2013-06-08 15:58:34 +03:00
José Valim
c78d3b3717
Clean up DocTestTest
2013-06-05 18:00:26 +08:00
Yuki Ito
1fa29be448
Option that enable to decide whether capture_io captures a prompt or not
2013-06-02 19:15:06 +09:00
Yuki Ito
9840ac266b
capture_io captures a prompt when capturing of stdio
2013-06-01 17:07:28 +09:00
Alexei Sholik
4ce444ad76
Include location info in the multiple exceptions error
2013-05-29 00:34:18 +03:00
Alexei Sholik
da4565ee88
Don't test DocTest's doctests
2013-05-28 19:07:30 +03:00
Alexei Sholik
7044f9c9da
Add a test for leaking vars
2013-05-28 16:36:32 +03:00
Alexei Sholik
5aa5268c5b
Implement extended doctest sessions. Closes #1020
2013-05-28 13:53:18 +03:00