Skip to content

Commit

Permalink
Merge pull request #227 from ahamez/master
Browse files Browse the repository at this point in the history
fix: use ExUnit.Case.register_test/6 rather than ExUnit.Case.register_test/4
  • Loading branch information
evnu authored Jun 13, 2024
2 parents 34191fb + 6138cd5 commit c564e89
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions lib/properties.ex
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,16 @@ 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 +376,15 @@ 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 c564e89

Please sign in to comment.