Thanks to Eric and Valim we now have the possiblity to provide a QuickCheck
test outcome as:
Finished in 1.4 seconds
5 *properties*, 1 failure
Instead of
Finished in 1.4 seconds
5 *tests*, 1 failure
when using properties instead of tests.
The solution is created by the more general *type* tests can have.
Now, I wonder whether we can also use this on line 260 in ExUnit.Case
quote bind_quoted: binding do
test = :"*test* #{message}"
ExUnit.Case.__on_definition__(__ENV__, test, [])
def unquote(test)(unquote(var)), do: unquote(contents)
end
Here we see a hard-coded "test" in the code (and on some more places as
well).
It would be cool to replace it with the type. I checked it quickly and it
seems to work for arbitrary text,
but I don't see how I get the tags into this function.
The result would be for failing tests:
1) *property* Property Instructions schema (InstructionsTest)
test/my_web_Instructions_eqc.exs:5
forall(json <- MyWeb.Type.Instructions.generate()) do
ensure(MyWeb.Type.Instructions.validate(json) == :ok)
end
Failed for
Another fancy thing that I would have preferred over 5 properties is
5 properties (511 tests), 1 failure
That is, to get access to the test counter and use the num_tests tag to
increase the number.
--
You received this message because you are subscribed to the Google Groups
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elixir-lang-core/a07c20da-60d7-4100-bf8b-ba673b0c2e1e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.