summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPéter Diviánszky <divipp@gmail.com>2016-04-15 15:20:23 +0200
committerPéter Diviánszky <divipp@gmail.com>2016-04-15 15:20:23 +0200
commit24c26eb57e456ee0c182e14a38953013f22f8613 (patch)
tree1a526c897ba42db3fdadca6df5c1b8f81aae4f54 /test
parenta3c73d2432ee502e4f47495932417c8ac5e63216 (diff)
fix arbitrary instance for Range
Diffstat (limited to 'test')
-rw-r--r--test/UnitTests.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/UnitTests.hs b/test/UnitTests.hs
index 016266d0..5774f356 100644
--- a/test/UnitTests.hs
+++ b/test/UnitTests.hs
@@ -38,8 +38,9 @@ instance Arbitrary SourcePos where
38-- Range 38-- Range
39 39
40instance Arbitrary Range where 40instance Arbitrary Range where
41 arbitrary = Range <$> arbitrary <*> arbitrary 41 -- TODO: generate only valid ranges (positive numbers, second position is after first one)
42 shrink (Range a b) = Range <$> shrink a <*> shrink b 42 arbitrary = Range <$> arbitrary <*> arbitrary <*> arbitrary
43 shrink (Range a b c) = Range <$> shrink a <*> shrink b <*> shrink c
43 44
44deriving instance Show Range 45deriving instance Show Range
45 46