{-# LANGUAGE ImportQualifiedPost #-}{-# LANGUAGE NumericUnderscores #-}{-# LANGUAGE PatternSynonyms #-}module Support.Property ( pattern PROP_TESTS , pattern PROP_TESTS_BRUTAL , storableRoundtrip , layout140 ) whereimport Hedgehogimport Data.Proxy (Proxy)import Foreign (Storable, peek, with)import Graphics.Gl.Block qualified as Block-- | Enough tests to cover the principlespattern PROP_TESTS :: TestLimitpattern PROP_TESTS = 10_000-- | Try harder to catch FP precision errorspattern PROP_TESTS_BRUTAL :: TestLimitpattern PROP_TESTS_BRUTAL = 10_000_000storableRoundtrip :: Storable a => a -> PropertyT IO astorableRoundtrip x = evalIO $ with x peeklayout140 :: Block.Block a => Proxy a -> (Int, Int)layout140 p = (Block.alignment140 p, Block.sizeOf140 p)