Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename "fuzz" and "fuzzer" to something else #229

Open
Janiczek opened this issue Jan 1, 2024 · 2 comments
Open

Rename "fuzz" and "fuzzer" to something else #229

Janiczek opened this issue Jan 1, 2024 · 2 comments

Comments

@Janiczek
Copy link
Collaborator

Janiczek commented Jan 1, 2024

Fuzzing is related to property-based testing but is its own separate thing.

We should not confuse people with weird naming (compared to the rest of the world).

Our "fuzz tests" are really property-based tests
Our "fuzzers" could be(?) generators, arbitraries, parsers. Maybe some other community found a better name. (Hypothesis has Strategies but the author hates that name in retrospect.)

This would need a major version bump, as well as changes to the runners.

@gampleman
Copy link
Contributor

I think Test.fuzz => Test.property is a no brainer.

We could call the Fuzz module ForAll...

So you would have:


suite = 
    Test.property "sorting is indempotent" (ForAll.list ForAll.int) <|
       \lst ->
           list |> sort |> sort |> Expect.equal (list sort)

@Janiczek
Copy link
Collaborator Author

Janiczek commented Nov 25, 2024

Just to explicitly point at it: your suggestion would change the order of arguments to Test.fuzz (from fuzzer,label,fn to label,fuzzer,fn). I like that change though - I'm a bit annoyed at the label not being the first currently.

Going against my conviction, I'll also note the original order could support something like Test.forall someFuzzer "some property".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants