summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanabodee Charoenpiriyakij <thanabodee.c@linecorp.com>2023-04-27 17:33:08 +0700
committerGitHub <noreply@github.com>2023-04-27 12:33:08 +0200
commit4df57ead677c7e73a5fbd9af7210f745d9669b1d (patch)
tree1ebc8ced94aea23c23e74adfb8ff088bcee54ebc
parent2f57bd9c36cd54a5523422846e1843211c95fc30 (diff)
downloadelixir-4df57ead677c7e73a5fbd9af7210f745d9669b1d.tar.gz
Add @doc since to ExUnit.Case (#12534)
* `describe/2` * `register_attribute/3` * `register_test/4` * `register_test/6`
-rw-r--r--lib/ex_unit/lib/ex_unit/case.ex4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/ex_unit/lib/ex_unit/case.ex b/lib/ex_unit/lib/ex_unit/case.ex
index 6fe97f160..73823b5d8 100644
--- a/lib/ex_unit/lib/ex_unit/case.ex
+++ b/lib/ex_unit/lib/ex_unit/case.ex
@@ -461,6 +461,7 @@ defmodule ExUnit.Case do
for the developer to glance at each describe block and know exactly the
setup steps involved.
"""
+ @doc since: "1.3.0"
defmacro describe(message, do: block) do
definition =
quote unquote: false do
@@ -526,6 +527,7 @@ defmodule ExUnit.Case do
display. You can use `ExUnit.plural_rule/2` to set a custom
pluralization.
"""
+ @doc since: "1.10.0"
def register_test(mod, file, line, test_type, name, tags) do
unless Module.has_attribute?(mod, :ex_unit_tests) do
raise "cannot define #{test_type}. Please make sure you have invoked " <>
@@ -596,6 +598,7 @@ defmodule ExUnit.Case do
"""
# TODO: Deprecate on Elixir v1.17
@doc deprecated: "Use register_test/6 instead"
+ @doc since: "1.3.0"
def register_test(%{module: mod, file: file, line: line}, test_type, name, tags) do
register_test(mod, file, line, test_type, name, tags)
end
@@ -628,6 +631,7 @@ defmodule ExUnit.Case do
end
"""
+ @doc since: "1.3.0"
@spec register_attribute(env, atom, keyword) :: :ok
def register_attribute(env, name, opts \\ [])
def register_attribute(%{module: mod}, name, opts), do: register_attribute(mod, name, opts)