Happy !
zeroflag / QuickCheck
About QuickCheck
Pharo QuickCheck
A simple and extensible implementation of the property-based testing tool called QuickCheck for Pharo Smalltalk.
Syntax
For all: Generator(s) where: optionalFilterBlock check: assertBlock samples: optionalNumberOfSamples
Examples
Single generator:
For all: PositiveIntegers check: [:int | self assert: (int * int) sqrt equals: int]
Using multiple generators:
For
all: (Collections of: Integers), (Collections of: Integers)
check: [:a :b | self assert: (a, b) size equals: a size + b size].
Filtering:
For
all: Integers, Integers
where: [:lt :gt | lt < gt]
check: [:lt :gt | self assert: (gt - lt) positive]
