Created
October 19, 2017 20:55
-
-
Save prikhi/6e544ba72e8fa1de04a7865a060dd818 to your computer and use it in GitHub Desktop.
roelof hspec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: eitherMonad | |
version: 0.1.0.0 | |
build-type: Simple | |
extra-source-files: README.md | |
cabal-version: >=1.10 | |
test-suite eitherMonad-test | |
type: exitcode-stdio-1.0 | |
hs-source-dirs: test | |
main-is: Spec.hs | |
build-depends: base | |
, hspec | |
, hspec-checkers | |
, checkers | |
, QuickCheck | |
other-modules: LawsCheckingSpec | |
ghc-options: -threaded -rtsopts -with-rtsopts=-N | |
default-language: Haskell2010 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module LawsCheckingSpec (spec) where | |
import Test.Hspec | |
spec :: Spec | |
spec = | |
describe "laws testing" $ | |
it "1 + 1 == 2" $ | |
1 + 1 `shouldBe` (2 :: Integer) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# OPTIONS_GHC -F -pgmF hspec-discover #-} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ stack clean; stack test [16:54:28] | |
eitherMonad-0.1.0.0: configure (test) | |
Configuring eitherMonad-0.1.0.0... | |
eitherMonad-0.1.0.0: build (test) | |
Preprocessing test suite 'eitherMonad-test' for eitherMonad-0.1.0.0... | |
[1 of 2] Compiling LawsCheckingSpec ( test/LawsCheckingSpec.hs, .stack-work/dist/x86_64-linux-nopie/Cabal-1.24.2.0/build/eitherMonad-test/eitherMonad-test-tmp/LawsCheckingSpec.o ) | |
[2 of 2] Compiling Main ( test/Spec.hs, .stack-work/dist/x86_64-linux-nopie/Cabal-1.24.2.0/build/eitherMonad-test/eitherMonad-test-tmp/Main.o ) | |
Linking .stack-work/dist/x86_64-linux-nopie/Cabal-1.24.2.0/build/eitherMonad-test/eitherMonad-test ... | |
eitherMonad-0.1.0.0: test (suite: eitherMonad-test) | |
Progress: 1/2 | |
LawsChecking | |
laws testing | |
1 + 1 == 2 | |
Finished in 0.0001 seconds | |
1 example, 0 failures | |
Completed 2 action(s). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. | |
├── eitherMonad.cabal | |
├── README.md | |
├── stack.yaml | |
└── test | |
├── LawsCheckingSpec.hs | |
└── Spec.hs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment