From dc86c9236188420008d1a98bbb9e124bb00d7b9f Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Thu, 12 Jan 2017 09:56:57 +0200 Subject: [PATCH] Fix stimes property See #30 --- tests/Main.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Main.hs b/tests/Main.hs index b80e8c8..27ea698 100644 --- a/tests/Main.hs +++ b/tests/Main.hs @@ -118,7 +118,8 @@ prop_Semigroup_sconcat :: NonEmpty [Int] -> Bool prop_Semigroup_sconcat xs = sconcat xs == toList (sconcat (fmap fromList xs)) prop_Semigroup_stimes :: Int -> [Int] -> Bool -prop_Semigroup_stimes n xs = stimes n xs == toList (stimes n (fromList xs)) +prop_Semigroup_stimes n xs = + n < 0 || stimes n xs == toList (stimes n (fromList xs)) #endif --------------------------------------------------------------------------------