armor
armor copied to clipboard
QuickCheck/Hedgehog integration?
It feels like the randomised generation of data that QuickCheck and Hedgehog offer are a good match for something like arbor - having something of type
testHedgehog :: Armored a => ArmorConfig -> String -> Gen a -> Test
feels pretty natural. Mainly wanted to open the issue to start the discussion because the library currently feels like it's half missing, but I'm not sure what the other half is! :)
Yeah, when I wrote the fake package I also had a similar feeling that it complimented armor very nicely. I wanted armor to be agnostic to your choice of test framework though. This is why it only depends on HUnit, which provides low level unit test infrastructure used by many of the test frameworks.
I'm also very interested in your fake package, I'm considering using it to produce reasonable Gen values for Hedgehog 😄 (Also considering adding some Australian instances of things like addresses and phone numbers).
Do you have any thoughts how a package linking Armor and QuickCheck or Hedgehog would look? It feels like you would need to specify a static random seed (as well as how many examples you want to exist).
Nothing concrete. I tried to make them both as self-contained and composable as I could. The testArmorMany function was created specifically to facilitate this kind of interoperability. I'm definitely willing to add more general helpers like that.