From 839620b47880be140087d26fffc626a6b59cc596 Mon Sep 17 00:00:00 2001 From: Jonathan Lamothe Date: Tue, 20 Aug 2024 19:04:10 -0400 Subject: [PATCH] use `HSpec` testing framework --- abacus.cabal | 1 + app/Main.hs | 3 +-- package.yaml | 1 + test/Spec.hs | 27 ++++++++++++++++++++++++++- 4 files changed, 29 insertions(+), 3 deletions(-) diff --git a/abacus.cabal b/abacus.cabal index f4b99b2..495053b 100644 --- a/abacus.cabal +++ b/abacus.cabal @@ -58,4 +58,5 @@ test-suite abacus-test build-depends: abacus , base >=4.7 && <5 + , hspec >=2.11.9 && <2.12 default-language: Haskell2010 diff --git a/app/Main.hs b/app/Main.hs index c88f25e..a9b6b08 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -1,7 +1,6 @@ {- -# abacus - +abacus Copyright (C) Jonathan Lamothe This program is free software: you can redistribute it and/or modify diff --git a/package.yaml b/package.yaml index 5a3a54d..0969041 100644 --- a/package.yaml +++ b/package.yaml @@ -56,3 +56,4 @@ tests: - -with-rtsopts=-N dependencies: - abacus + - hspec >= 2.11.9 && < 2.12 diff --git a/test/Spec.hs b/test/Spec.hs index cd4753f..1f71f27 100644 --- a/test/Spec.hs +++ b/test/Spec.hs @@ -1,2 +1,27 @@ +{- + +abacus +Copyright (C) Jonathan Lamothe + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public +License along with this program. If not, see +. + +-} + +import Test.Hspec (hspec) + main :: IO () -main = putStrLn "Test suite not yet implemented" +main = hspec $ return () + +-- jl