diff options
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/src/Thermoprint/Printout.hs | 11 | ||||
| -rw-r--r-- | spec/thermoprint-spec.cabal | 2 | ||||
| -rw-r--r-- | spec/thermoprint-spec.nix | 2 |
3 files changed, 10 insertions, 5 deletions
diff --git a/spec/src/Thermoprint/Printout.hs b/spec/src/Thermoprint/Printout.hs index 752ccb5..53b6a3e 100644 --- a/spec/src/Thermoprint/Printout.hs +++ b/spec/src/Thermoprint/Printout.hs | |||
| @@ -37,7 +37,7 @@ import Data.Proxy (Proxy(..)) | |||
| 37 | 37 | ||
| 38 | import Test.QuickCheck.Arbitrary (Arbitrary(..), CoArbitrary, genericShrink) | 38 | import Test.QuickCheck.Arbitrary (Arbitrary(..), CoArbitrary, genericShrink) |
| 39 | import Test.QuickCheck.Modifiers (NonNegative(..)) | 39 | import Test.QuickCheck.Modifiers (NonNegative(..)) |
| 40 | import Test.QuickCheck.Gen (oneof, scale) | 40 | import Test.QuickCheck.Gen (oneof, scale, elements) |
| 41 | import Test.QuickCheck.Instances | 41 | import Test.QuickCheck.Instances |
| 42 | import Test.QuickCheck (forAll, Property) | 42 | import Test.QuickCheck (forAll, Property) |
| 43 | 43 | ||
| @@ -242,10 +242,14 @@ data MarkupMode = Bold | |||
| 242 | | Underline | 242 | | Underline |
| 243 | | DoubleHeight | 243 | | DoubleHeight |
| 244 | | DoubleWidth | 244 | | DoubleWidth |
| 245 | deriving (Generic, NFData, Show, Arbitrary, CoArbitrary, FromJSON, ToJSON | 245 | deriving (Generic, NFData, Show, FromJSON, ToJSON |
| 246 | , Eq, Ord, Enum | 246 | , Eq, Ord, Enum, Bounded |
| 247 | ) | 247 | ) |
| 248 | 248 | ||
| 249 | instance Arbitrary MarkupMode where | ||
| 250 | arbitrary = elements [minBound..maxBound] | ||
| 251 | instance CoArbitrary MarkupMode | ||
| 252 | |||
| 249 | -- | We don't test 'Raw' 'Chunk's | 253 | -- | We don't test 'Raw' 'Chunk's |
| 250 | instance Arbitrary Chunk where | 254 | instance Arbitrary Chunk where |
| 251 | shrink = genericShrink | 255 | shrink = genericShrink |
| @@ -262,6 +266,7 @@ instance Arbitrary Line where | |||
| 262 | shrink = genericShrink | 266 | shrink = genericShrink |
| 263 | arbitrary = oneof [ Word . TL.filter (not . isSpace) <$> arbitrary -- 'isSpace '\n' == True' | 267 | arbitrary = oneof [ Word . TL.filter (not . isSpace) <$> arbitrary -- 'isSpace '\n' == True' |
| 264 | , HSpace . getNonNegative <$> arbitrary | 268 | , HSpace . getNonNegative <$> arbitrary |
| 269 | , Markup <$> arbitrary <*> arbitrary | ||
| 265 | , JuxtaPos <$> scale' arbitrary | 270 | , JuxtaPos <$> scale' arbitrary |
| 266 | ] | 271 | ] |
| 267 | 272 | ||
diff --git a/spec/thermoprint-spec.cabal b/spec/thermoprint-spec.cabal index d4ecda6..138a06e 100644 --- a/spec/thermoprint-spec.cabal +++ b/spec/thermoprint-spec.cabal | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | -- documentation, see http://haskell.org/cabal/users-guide/ | 2 | -- documentation, see http://haskell.org/cabal/users-guide/ |
| 3 | 3 | ||
| 4 | name: thermoprint-spec | 4 | name: thermoprint-spec |
| 5 | version: 5.0.0 | 5 | version: 5.0.1 |
| 6 | synopsis: A specification of the API and the payload datatypes and associated utilities | 6 | synopsis: A specification of the API and the payload datatypes and associated utilities |
| 7 | -- description: | 7 | -- description: |
| 8 | homepage: http://dirty-haskell.org/tags/thermoprint.html | 8 | homepage: http://dirty-haskell.org/tags/thermoprint.html |
diff --git a/spec/thermoprint-spec.nix b/spec/thermoprint-spec.nix index 1a1611c..a3093de 100644 --- a/spec/thermoprint-spec.nix +++ b/spec/thermoprint-spec.nix | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | }: | 4 | }: |
| 5 | mkDerivation { | 5 | mkDerivation { |
| 6 | pname = "thermoprint-spec"; | 6 | pname = "thermoprint-spec"; |
| 7 | version = "5.0.0"; | 7 | version = "5.0.1"; |
| 8 | src = ./.; | 8 | src = ./.; |
| 9 | libraryHaskellDepends = [ | 9 | libraryHaskellDepends = [ |
| 10 | aeson base base64-bytestring bytestring Cabal cabal-test-quickcheck | 10 | aeson base base64-bytestring bytestring Cabal cabal-test-quickcheck |
