Top 1K Features Creators Events Podcasts Books Extensions Interviews Blog Explorer CSV

Hspec

< >

Hspec is a programming language created in 1990.

#2591on PLDB 36Years Old
Homepage

Hspec is a testing framework for Haskell.


Example from the web:
-- file Spec.hs import Test.Hspec import Test.QuickCheck import Control.Exception (evaluate) main :: IO () main = hspec $ do describe "Prelude.head" $ do it "returns the first element of a list" $ do head [23 ..] `shouldBe` (23 :: Int) it "returns the first element of an *arbitrary* list" $ property $ \x xs -> head (x:xs) == (x :: Int) it "throws an exception if used with an empty list" $ do evaluate (head []) `shouldThrow` anyException

- Build the next great programming language 路 Add 路 Add Prompt 路 Issues 路 About 路 Search 路 Keywords 路 Livestreams 路 Labs 路 Resources 路 Acknowledgements

Built with Scroll v178.2.3