aleeusgr / gimbalabs-dandelion-pbl

Test Driven Development of dApps on Cardano
MIT License
1 stars 1 forks source link

a test with quickcheck #14

Closed aleeusgr closed 1 year ago

aleeusgr commented 1 year ago

Continuing https://github.com/aleeusgr/gimbalabs-dandelion-pbl/issues/3

Case

Here is a property check;

for all (a, b, c) strings the concatenation of a, b and c always contains b

Docs

https://www.cse.chalmers.se/~rjmh/QuickCheck/manual.html

aleeusgr commented 1 year ago

https://www.schoolofhaskell.com/user/pbv/an-introduction-to-quickcheck-testing

A property for QuickCheck is simply a truth-valued function whose arguments are implicitly universally quantified.

aleeusgr commented 1 year ago

3 Test suite qcheck-test: RUNNING... [0/52] 2 *** Failed! Falsified (after 3 tests and 4 shrinks): 1 [0] 4 [1] 1 Test suite qcheck-test: PASS

aleeusgr commented 1 year ago

Ok, I need to move functions to /src; I need to see an example.

aleeusgr commented 1 year ago

https://www.schoolofhaskell.com/user/pbv/an-introduction-to-quickcheck-testing More thorough testing

aleeusgr commented 1 year ago

I need to find out what properties are, which properties exist, can we construct new ones, should we?

aleeusgr commented 1 year ago

https://medium.com/criteo-engineering/introduction-to-property-based-testing-f5236229d237