From 351e8a5f01f7b5fdd210201018a9538772364ae2 Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone Date: Wed, 11 Jan 2023 11:47:47 -0500 Subject: [PATCH 1/3] Depend on hspec and hspect-expectations for these APIs --- spake2.cabal | 2 ++ tests/Groups.hs | 5 ++++- tests/Integration.hs | 6 +++++- tests/Spake2.hs | 6 +++++- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/spake2.cabal b/spake2.cabal index 57313dc..d7e0fd6 100644 --- a/spake2.cabal +++ b/spake2.cabal @@ -86,7 +86,9 @@ test-suite tasty , protolude >=0.3 && <0.4 , spake2 , tasty + , hspec >= 1.2, <2 , tasty-hspec + , hspec-expectations >= 0.8.2, <0.9 other-modules: Groups Integration diff --git a/tests/Groups.hs b/tests/Groups.hs index faf633b..5530b72 100644 --- a/tests/Groups.hs +++ b/tests/Groups.hs @@ -7,7 +7,10 @@ import Protolude hiding (group) import Crypto.Error (CryptoFailable(..)) import Test.QuickCheck (Gen, (===), arbitrary, forAll, property) import Test.Tasty (TestTree) -import Test.Tasty.Hspec (Spec, testSpec, describe, it, shouldBe) +import Test.Tasty.Hspec (testSpec) + +import Test.Hspec (Spec, describe, it) +import Test.Hspec.Expectations (shouldBe) import Crypto.Spake2.Group (AbelianGroup(..), Group(..)) import Crypto.Spake2.Groups diff --git a/tests/Integration.hs b/tests/Integration.hs index 9ac6b3d..f08a4be 100644 --- a/tests/Integration.hs +++ b/tests/Integration.hs @@ -10,7 +10,11 @@ import qualified Data.ByteString.Char8 as Char8 import qualified System.IO as IO import qualified System.Process as Process import Test.Tasty (TestTree) -import Test.Tasty.Hspec (testSpec, describe, it, shouldBe) +import Test.Tasty.Hspec (testSpec) + +import Test.Hspec (describe, it) +import Test.Hspec.Expectations (shouldBe) + import qualified Crypto.Spake2 as Spake2 import Crypto.Spake2.Group (Group(arbitraryElement)) diff --git a/tests/Spake2.hs b/tests/Spake2.hs index b615332..72e5448 100644 --- a/tests/Spake2.hs +++ b/tests/Spake2.hs @@ -2,7 +2,11 @@ module Spake2 (tests) where import Protolude hiding (group) import Test.Tasty (TestTree) -import Test.Tasty.Hspec (testSpec, describe, it, shouldBe, shouldNotBe) +import Test.Tasty.Hspec (testSpec) + +import Test.Hspec (describe, it) +import Test.Hspec.Expectations (shouldBe, shouldNotBe) + import Crypto.Hash (SHA256(..)) import qualified Crypto.Spake2 as Spake2 From 1c70154ad3a4b3da9dd4c2641803c297438d7d26 Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone Date: Wed, 11 Jan 2023 11:50:03 -0500 Subject: [PATCH 2/3] Get the syntax right --- spake2.cabal | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spake2.cabal b/spake2.cabal index d7e0fd6..6ea7052 100644 --- a/spake2.cabal +++ b/spake2.cabal @@ -86,9 +86,9 @@ test-suite tasty , protolude >=0.3 && <0.4 , spake2 , tasty - , hspec >= 1.2, <2 + , hspec >= 1.2 && <2 , tasty-hspec - , hspec-expectations >= 0.8.2, <0.9 + , hspec-expectations >= 0.8.2 && <0.9 other-modules: Groups Integration From 85099b3d6b3e54cf05ebbe5b7275718d2674411f Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone Date: Wed, 11 Jan 2023 11:50:40 -0500 Subject: [PATCH 3/3] Get the hspec boundary right --- spake2.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spake2.cabal b/spake2.cabal index 6ea7052..b2a899e 100644 --- a/spake2.cabal +++ b/spake2.cabal @@ -86,7 +86,7 @@ test-suite tasty , protolude >=0.3 && <0.4 , spake2 , tasty - , hspec >= 1.2 && <2 + , hspec >= 2.10 && <3 , tasty-hspec , hspec-expectations >= 0.8.2 && <0.9 other-modules: