Skip to content

Commit

Permalink
fix: use ExUnit.Case.register_test/6
Browse files Browse the repository at this point in the history
ExUnit.Case.register_test/4 is deprecated since Elixir 1.12
  • Loading branch information
ahamez committed Jun 13, 2024
1 parent 34191fb commit b3b1139
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/properties.ex
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ defmodule PropCheck.Properties do

# @tag failing_prop: tag_property({module, prop_name, []})
tags = [[failing_prop: tag_property({module, name, []})]]
prop_name = ExUnit.Case.register_test(__ENV__, :property, name, tags)
prop_name = ExUnit.Case.register_test(__ENV__.module, __ENV__.file, __ENV__.line, :property, name, tags)

def unquote(prop_name)(unquote(var)) do
{:ok, output_agent} = PropCheck.OutputAgent.start_link()
Expand Down Expand Up @@ -367,7 +367,7 @@ defmodule PropCheck.Properties do
"""
defmacro property(message) do
quote bind_quoted: [message: message] do
prop_name = ExUnit.Case.register_test(__ENV__, :property, message, [:not_implemented])
prop_name = ExUnit.Case.register_test(__ENV__.module, __ENV__.file, __ENV__.line, :property, message, [:not_implemented])

def unquote(prop_name)(_) do
flunk("Not implemented")
Expand Down

0 comments on commit b3b1139

Please sign in to comment.