José Valim
fc5050d122
Convert ex_unit context to a map
2014-05-07 23:13:53 +02:00
José Valim
b0a5197f42
Convert ExUnit.Test and ExUnit.TestCase to structs
2014-05-06 22:24:03 +02:00
José Valim
f1effcb485
Use Exception.message/1 instead of exception.message
2014-05-06 18:33:02 +02:00
José Valim
21f2f0f112
Report the test line on exunit errors
2014-05-01 14:25:31 +02:00
José Valim
3c6e63a962
Ensure filters can compare aliases and regexes
2014-05-01 11:43:13 +02:00
José Valim
f75666515a
Ensure teardown failures are shown, closes #2222
2014-04-30 21:48:30 +02:00
José Valim
1679f6b4d7
Tidy up ExUnit.Filters docs
2014-04-29 19:42:10 +02:00
Martin Schürrer
7f8a52c264
Support line numbers in mix test, e.g. test/some/file_test.exs:12
2014-04-29 18:51:12 +02:00
Martin Schürrer
bc6975cdae
Make ExUnit.Filters convert to_string before matching. Fixes #2064 .
...
Makes mix test --only line:9 or --only "test:Test Message" work.
2014-04-28 17:38:33 +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
f6a24985b2
Also add a test for teardown failures
2014-04-21 11:29:04 +02:00
José Valim
76bee630a2
Clean up doc tests
2014-04-21 11:26:51 +02:00
José Valim
edfb650c94
Properly format and indent test output
2014-04-19 11:31:58 +02:00
José Valim
860c056cbe
Clean up new formatter implementation
2014-04-18 12:01:50 +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
José Valim
bdab8045b9
Rename StringIO API to be more IO like (start -> open, stop -> close)
2014-03-27 09:17:04 +01:00
José Valim
9cbe498a02
Update heredoc tests
2014-03-26 12:16:50 +01:00
José Valim
26f5f640c9
Initial work on traversable
2014-03-05 08:08:43 -08:00
Yuki Ito
eaa2db1809
Raise error if another capture_io process already captured the device
2014-03-05 21:10:50 +09:00
Eric Meadows-Jönsson
9e068fb0a2
Support :io.get_password in StringIO
2014-03-01 17:58:51 +01:00
José Valim
f5660dad92
Add a test to ensure setup_all doesn't choke on errors
2014-02-18 13:36:21 +01:00
José Valim
bacb1a530a
Spawn one event manager per ExUnit run instead of a global one
2014-02-11 11:09:25 +01:00
Peter Minten
c151739415
Use a gen_server for exunit formatter dispatch
...
This allows multiple formatters per run.
Signed-off-by: José Valim <jose.valim@plataformatec.com.br >
2014-02-11 10:26:01 +01:00
Yuki Ito
b6f80fc05f
Use StringIO in CaptureIO
...
capture_io retunrs `""` instead of `nil`
2014-02-09 16:19:36 +01:00
Eric Meadows-Jönsson
dbb6f358cc
assert_receive(d) should leak
...
Closes #2030 .
2014-02-08 21:48:02 +01:00
José Valim
b46481e12f
Improve doc test error messages
2014-02-06 14:14:03 +01:00
José Valim
ba54afbf45
Move to new sigils syntax
2014-02-05 14:39:04 +01:00
José Valim
058d55b68c
Fix test suite warnings on 17.0-rc1
...
Those warnings happen because we need to test basic functionality,
like `nil?(nil) == true` and the Erlang compiler can see this
expression will always work.
We can work around this issue by adding a bit of indirection, like
`nil?(List.first([nil])) == true`.
2014-02-03 13:45:27 +01:00
José Valim
66e0c53593
Revert "Deprecate =~"
...
This reverts commit e42e3e55ca .
2014-01-31 09:15:06 +01:00
José Valim
e42e3e55ca
Deprecate =~
...
Use String.contains?/2 when the right side is a string or
String.match?/2 when the right side is a regex.
The goal of this deprecation is to make space for the upcoming
`~` and `~=` operators.
2014-01-28 12:50:39 +01:00
José Valim
fe2e4a1010
Move from // to \\
2014-01-28 10:50:00 +01:00
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