Open johnnychen94 opened 4 years ago
I wonder if we shoukld infact switch to having a function that returns true or false, or throws an error, depending.
Then we could do:
@test matches_reference(actual, "reference.txt")
@test_broken matches_reference(actual, "reference.txt")
@test_skip matches_reference(actual, "reference.txt")
@test !matches_reference(actual, "reference.txt")
rather than having to recrate each.
Are we getting value out of having a top-level macro that we couldn't get out of a function?
I wonder if we shoukld infact switch to having a function that returns true or false, or throws an error, depending.
I like this idea a lot; I've been continuing thinking of replacing @test_reference
by test_reference
these days.
So export test_reference
and deprecate @test_reference
?
yeah, i think so. We might want to bike-shed on the name a bit first though.
@test test_reference(actual, "reference.txt")
to me doesn't feel right.
and
@test !test_reference(actual, "reference.txt")
feels really wrong. (It is a weird thing to do in the first place but anyway...)
Definately will want a deprecation this time. Which means first tagging a nonbreaking relese with the deprecation then a breaking release (at some point) with the deprecation removed.
Codes here are not ready for review (most of the part is copy&paste).
@test_reference_broken
is introduced here, and it works like@test_broken
.Some details needs to be clarified and added. But I'd like to show it as a demo of an alternative to #12
A test result: