6 ms·
Have you thought about adding some kind of QuickCheck-ish model where test cases can be randomly generated for various types?
by anaphor 13y ago
Have you thought about adding some kind of QuickCheck-ish model where test cases can be randomly generated for various types?
- tel 13y agoThis exists in Haskell's doctest library -- | Documentation goes here -- -- > 2 + 2 == 4 -- True -- -- prop> \lst -> reverse (reverse lst) == lst
- skrishnamurthi 13y agoYes, of course, we've thought about it. Equally importantly, we have a "satisfies" keyword for stating checks about properties. (See the example on the Pyret home page.) We use test oracles extensively in teaching; see these two assignments: http://cs.brown.edu/courses/cs019/2012/assignments/sortacle http://cs.brown.edu/courses/cs019/2012/assignments/sortacle , http://cs.brown.edu/courses/cs019/2012/assignments/oracle http://cs.brown.edu/courses/cs019/2012/assignments/oracle .