Fork me on GitHub
#test-check
<
2020-08-27
>
sogaiu11:08:36

i came across this: https://github.com/renatahodovan/grammarinator and started wondering if it is possible to take an antlr grammar of something and generate things based on it for use with test.check.

gfredericks15:08:05

Should totally be possible. test.chuck's regex generator is similar

sogaiu21:08:28

thanks! i was thinking about ashnur's email address problem being discussed on another channel and i noticed there is an antlr grammar for rfc822 email addresses: https://github.com/antlr/grammars-v4/tree/master/rfc822/rfc822-emailaddress

sogaiu13:08:07

test.chuck's regex generator is quite neat! i also found instacheck and instagenerator. ha ha -- so late to the party 🙂

gfredericks13:08:57

I hadn't heard of either of those

gfredericks14:08:17

Cool. Apparently I must have seen the second one and forgot about it, since it mentions me

arohner15:08:23

Before I embark on this journey, has anyone written a thing that combines prop/for-all and gen/let?

gfredericks15:08:39

Does test.chuck have something like that? I think so

arohner15:08:47

Yeah, looks like test.chuck.gen/for is what I want, thanks

arohner16:08:50

Hrm, though I can’t stick it in the prop/for-all, which is what I wanted to solve:

(prop/for-all [[a b c] (gen/let [a gen-a b gen-b c gen-c] [a b c] (do-test))

arohner16:08:02

I’m trying to avoid ^^ that boilerplate

arohner16:08:39

oh, prop'/for-all, I just have to keep reading

gfredericks16:08:30

Yep 🙂