Version 0.1.0.0-1 of microspec is deprecated.
The latest version of microspec is 0.2.1.3-0.
microspec
Version 0.1.0.0 revision 1 uploaded by TomMurphy.
Package meta
- Synopsis
- Tiny QuickCheck test library with minimal dependencies
- Description
A tiny (1 module, <500 lines) property-based (and unit) testing library with minimal dependencies.
Don't add a bunch of transitive dependencies just to test your code!
Instead of reinventing the wheel (https://xkcd.com/927), we use a RSpec/HSpec-like API and run tests with QuickCheck.
import Test.Microspec main :: IO () main = microspec $ do describe "replicate" $ do it "doubles with 2" $ replicate 2 'x' == "xx" it "creates a list of the right size" $ \(Positive n) -> length (replicate n 'x') == n describe "reverse" $ do it "reverse . reverse == id" $ \l -> reverse (reverse l) == (l :: [Int]) describe "tail" $ it "length is -1" $ \(NonEmpty l) -> length (tail l :: [Int]) == length l - 1 describe "solve the halting problem" $ pending
- Author
- Tom Murphy
- Bug reports
- n/a
- Category
- Test, Testing
- Copyright
- n/a
- Homepage
- n/a
- Maintainer
- Tom Murphy
- Package URL
- n/a
- Stability
- experimental