@@ -21,8 +21,7 @@ import Control.Exception
21
21
import Data.ByteString ( ByteString )
22
22
import qualified Data.ByteString as BS
23
23
import Test.QuickCheck
24
- import Test.QuickCheck.Checkers
25
- import qualified Test.QuickCheck.Classes as QC
24
+ import qualified Test.QuickCheck.Classes.Base as QC
26
25
import GHC.IO.Encoding.UTF8 ( mkUTF8 )
27
26
import GHC.IO.Encoding.UTF16 ( mkUTF16le )
28
27
import GHC.IO.Encoding ( setFileSystemEncoding )
@@ -33,6 +32,7 @@ import qualified Data.ByteString.Char8 as C
33
32
import qualified System.OsPath.Data.ByteString.Short.Word16 as BS16
34
33
import qualified System.OsPath.Data.ByteString.Short as SBS
35
34
import Data.Char ( ord )
35
+ import Data.Proxy ( Proxy (.. ) )
36
36
37
37
import Arbitrary
38
38
@@ -233,24 +233,20 @@ tests =
233
233
)
234
234
235
235
236
- ] ++ testBatch (QC. ord ( \ (a :: OsPath ) -> pure a ))
237
- ++ testBatch (QC. monoid ( undefined :: OsPath ))
236
+ ] ++ QC. lawsProperties (QC. ordLaws ( Proxy @ OsPath ))
237
+ ++ QC. lawsProperties (QC. monoidLaws ( Proxy @ OsPath ))
238
238
239
- ++ testBatch (QC. ord ( \ (a :: OsString ) -> pure a ))
240
- ++ testBatch (QC. monoid ( undefined :: OsString ))
239
+ ++ QC. lawsProperties (QC. ordLaws ( Proxy @ OsString ))
240
+ ++ QC. lawsProperties (QC. monoidLaws ( Proxy @ OsString ))
241
241
242
- ++ testBatch (QC. ord ( \ (a :: WindowsString ) -> pure a ))
243
- ++ testBatch (QC. monoid ( undefined :: WindowsString ))
242
+ ++ QC. lawsProperties (QC. ordLaws ( Proxy @ WindowsString ))
243
+ ++ QC. lawsProperties (QC. monoidLaws ( Proxy @ WindowsString ))
244
244
245
- ++ testBatch (QC. ord ( \ (a :: PosixString ) -> pure a ))
246
- ++ testBatch (QC. monoid ( undefined :: PosixString ))
245
+ ++ QC. lawsProperties (QC. ordLaws ( Proxy @ PosixString ))
246
+ ++ QC. lawsProperties (QC. monoidLaws ( Proxy @ PosixString ))
247
247
248
- ++ testBatch (QC. ord (\ (a :: PlatformString ) -> pure a))
249
- ++ testBatch (QC. monoid (undefined :: PlatformString ))
250
-
251
- -- | Allows to insert a 'TestBatch' into a Spec.
252
- testBatch :: TestBatch -> [(String , Property )]
253
- testBatch (_, tests') = tests'
248
+ ++ QC. lawsProperties (QC. ordLaws (Proxy @ PlatformString ))
249
+ ++ QC. lawsProperties (QC. monoidLaws (Proxy @ PlatformString ))
254
250
255
251
256
252
padEven :: ByteString -> ByteString
0 commit comments