Commit Graph
1133 Commits
Author SHA1 Message Date
José Valim c966088145 Update CHANGELOG 2019-07-09 16:59:08 +02:00
Allen Madsen 6f7ce49aa8 Add describe and module attributes (#9181) 2019-07-03 20:38:19 +02:00
Andrea Leopardi 6b0372afe1 Add test for @describetag outside of describe block (#9180) 2019-06-30 23:28:57 +02:00
Andrea Leopardi 14b00b1a0b Slightly improve docs for ExUnit.Case
[ci skip]
2019-06-30 19:55:52 +02:00
Allen Madsen c33af3aa39 Raise for @describetag defined before use ExUnit.Case (#9179) 2019-06-30 19:33:19 +02:00
Eric Meadows-Jönsson 9b6ec7bae7 Move unreachable function check from xref to group pass (#9168) 2019-06-28 10:25:49 +02:00
José Valim ce41a70b2e Update registered process lists, closes #9103 2019-05-31 19:24:17 +02:00
José Valim c4468a95de Rewrite start_supervised already started into duplicate_child_name
Closes #9089.
2019-05-28 23:03:05 +02:00
Fernando Tapia Rico 030e0c7b53 Do not explicitly recompile regexes, fallback to binary matching
Regexes used to be precompiled to binary values during code
compilation. These binary values may be incompatible with
different operating systems and OTP releases. That's why
an explicit `Regex.recompile/1` or `Regex.recompile!/1` was
required.

Regexes now fallback to binary matching if the precompiled
binary is not compatible with the runtime version.
2019-05-21 10:41:19 +02:00
José Valim c72162ab52 Include apps/APP prefix in test locations when running from umbrella root 2019-05-18 22:04:26 +02:00
José Valim 01175743b7 Only keep last expression from doctest 2019-05-07 18:12:12 +02:00
Hans 8d2e15c3af Display the actual doctest code when doctset fails (#8903) 2019-05-07 18:00:21 +02:00
Wojtek Mach 9931dcf9c3 Allow multiple ex_unit filter excludes (#9003) 2019-05-01 10:48:41 +02:00
Szymon Madeja 714eeb4922 Clarify assert/2 documentation (#8955)
The documentation for assert/2 suggests that it behaves differently than
assert/1, which is not the case.
2019-04-13 22:23:26 +02:00
José Valim d48b16cf54 Quote :: to avoid ambiguity (#8890) 2019-03-14 17:08:04 +01:00
eksperimental 4cb3c123f3 Fix function/arity surrounded by backticks not being linked
The command to find the offending lines is:

$ ag '<code [^<>]*class=\"inline\">[a-z_][A-Za-z0-9_]*[?!]?/\d+</code>(?!</a>)' doc/
2019-03-12 23:25:33 +01:00
Eksperimental 99d919e0c8 Use "code point" instead of "codepoint" (#8774)
That's the term it is used in the Unicode standard.
2019-02-06 11:21:03 +01:00
Eksperimental 083974aacf ExUnit: Improve timeout error message and info (#8766) 2019-02-04 10:01:56 +01:00
Tobiasz Małecki 38e369766d Improve the docs for ExUnit.Case (#8709) 2019-01-25 18:27:47 +01:00
Tobiasz Małecki 3bd3f88d57 ExUnit.Callbacks moduledoc example improvement (#8708) 2019-01-25 14:55:02 +01:00
Tobiasz Małecki 54d2b58f3e ExUnit.Assertions docs examples improvement (#8698) 2019-01-25 08:23:16 +01:00
Tobiasz Małecki a4e41d059c ExUnit.DocTest moduledoc examples improvement (#8697) 2019-01-25 08:22:25 +01:00
Tobiasz Małecki 22b8238c50 ExUnit.CaseTemplate moduledoc example improvement (#8696) 2019-01-24 22:40:06 +01:00
Tobiasz Małecki d9f0488fc1 ExUnit.CaptureIO documentation examples improvement (#8695) 2019-01-24 22:39:38 +01:00
Tobiasz Małecki a128b0ac07 ExUnit.CaptureLog moduledoc improvement (#8693) 2019-01-24 22:19:54 +01:00
José Valim fee525f65e Do not execute :rand.uniform/1 at the time the docs are defined
Closes #8689
2019-01-24 17:33:04 +01:00
Devon Estes 4da4ccdb8c Add ability to filter by more than one line number (#8673) 2019-01-23 13:34:42 +01:00
Fernando Tapia Rico 13179d2958 Augment doctest errors with misplaced opaque types (#8653) 2019-01-22 08:48:10 +01:00
Fernando Tapia Rico 7af2e48156 Minor grammar fix in ExUnit.CaptureIO (#8644)
[ci skip]
2019-01-17 19:33:45 +01:00
José Valim 17e86fd7eb Improve capture_io signature and docs 2019-01-17 17:59:17 +01:00
José Valim b8c68e6df3 Clarify the need for stop_supervised/1 2019-01-17 13:44:36 +01:00
Eksperimental 0da99435c3 Use ID and not id (#8639)
The command used to detect these entries:
ag -s "\b(?<![/:{_\[.])ids?(?![}:_\]])(?!\(\))(?!enti)(?!ea)(?!iom)(?!x)"  --elixir
2019-01-16 19:14:39 +01:00
Devon Estes ffa3c8bc4b Add documentation about ExUnit.Test.time (#8583)
* Add documentation about ExUnit.Test.time

Now we're specifying what that integer actually represents -
microseconds!

* Update lib/ex_unit/lib/ex_unit.ex

Co-Authored-By: devonestes <devon.c.estes@gmail.com>
2019-01-01 19:12:57 +01:00
José Valim 963c3eb61d No longer wrap doctest errors in custom exception
They end-up hiding more information than showing.

Closes #8547
2018-12-31 12:17:44 +01:00
José Valim 0c1df34645 Standardize more TODOs 2018-12-21 13:42:54 +01:00
José Valim d85ed42765 Update removal and deprecation annotations
In particular, all deprecated code would be removed on v2.0,
so we don't need to annotate dperecated code with a TODO to
remove it on v2.0.
2018-12-21 13:27:06 +01:00
Fernando Tapia Rico 450261295f Deprecate %{key => value} in typespecs (#8537)
%{required(foo) => bar} and %{optional(foo) => bar} should be used.
2018-12-21 12:55:57 +01:00
eksperimental 5c35c37768 Replace quotation dash with "--"
While correct, it is reported in  #4408 that it will not display correctly em-dashes in
Windows terminals.
2018-12-11 14:42:29 +01:00
José Valim 1904fe0fb0 Avoid race condition on device re-registering 2018-12-06 14:53:32 +01:00
Wojtek Mach fad027f029 Add missing @doc since: "1.8.0" to new functions (#8466) 2018-12-05 17:07:40 +01:00
Emil Lynegaard 00a67e3eea Improve error message in multiline iex doctest (#8462)
The previous indentation error message was of no help
in cases where a doctest had a `iex>` command
with multiline expressions.
2018-12-04 20:24:40 +01:00
José Valim ae644808dd No longer persist dynamically added logger backends (#8424)
Otherwise it is impossible to dynamically remove them,
which partially defeats the point of adding them dynamically
in the first place.

Therefore this commit moves the whole dynamic backend
management to the user.

Closes #8213
2018-11-26 14:36:11 +01:00
Eksperimental 3a3d68385e Revise use of "flag" terminology (#8347) 2018-11-16 09:53:53 +01:00
Edwin Mak 84056459f7 Update documented example for ExUnit register_attribute (#8363) 2018-11-04 20:01:10 +01:00
Eksperimental 8e73f5e03d Change order in which filter meesage are printed in ExUnit.CLIFormatter (#8342)
It was printing this when running: mix test --only foo

Including tags: [:foo]
Excluding tags: [:test]

which is deceiving beucase the order end up rendering useless the include filter.

Swaps the order then.

Additionally swaps the order in ExUnit.Formatter.format_filters/2 and tests,
while not necessary, maintaining the order is a good thing when it's something related
to precedence.
2018-10-26 09:59:27 +02:00
Eksperimental bbaf2c513c Change the precedence in ExUnit.Filters.eval/4 (#8340)
Fixes issues mentioned in #8335, particularly in this discussion:
https://github.com/elixir-lang/elixir/pull/8335#pullrequestreview-168148010

Tests should be first excluded, then included, and then skipped (if any left).
The only exception to the rule is when we explicitly include tests with :skip filter,
to which the :ok value is returned.
2018-10-26 09:59:04 +02:00
Fernando Tapia Rico 2d19ae4640 Remove backticks from error messages and test desc (#8343)
To keep consistency in the codebase.
2018-10-26 08:38:01 +02:00
José Valim 4e8b13e15b Remove extra empty line 2018-10-25 20:56:39 +02:00
José Valim 2e5b941a34 Remove @doc from tests 2018-10-25 20:56:00 +02:00
Eksperimental 5396a8b6b6 Check for line ending in output messages (#8319)
Check for line ending in output messages in ex_unit_tests.exs and beginning of line when applicable. This makes sure we check for the full line,
avoiding unexpected results appearing at the end of the line. Related discussion:
https://github.com/elixir-lang/elixir/pull/8312#discussion_r226867015

Remove on_exit_reload_config/0 and replace it with configure_and_reload_on_exit/1
2018-10-23 10:09:21 +02:00