commit d53a9cdc30e537b10308913256af15052394f588
parent 871e8f4dc39d0d0abcbeaa2db8285fc84d8fdf84
Author: Jared Tobin <jared@jtobin.io>
Date: Sun, 30 Nov 2025 11:05:46 +0400
test: re-add skeleton
Diffstat:
3 files changed, 67 insertions(+), 0 deletions(-)
diff --git a/ppad-fixed.cabal b/ppad-fixed.cabal
@@ -40,6 +40,24 @@ library
base >= 4.9 && < 5
, deepseq >= 1.5 && < 1.6
+test-suite fixed-tests
+ type: exitcode-stdio-1.0
+ default-language: Haskell2010
+ hs-source-dirs: test
+ main-is: Main.hs
+ other-modules:
+ Limb
+
+ ghc-options:
+ -rtsopts -Wall -O2
+
+ build-depends:
+ base
+ , ppad-fixed
+ , tasty
+ , tasty-hunit
+ , tasty-quickcheck
+
benchmark fixed-bench
type: exitcode-stdio-1.0
default-language: Haskell2010
diff --git a/test/Limb.hs b/test/Limb.hs
@@ -0,0 +1,11 @@
+{-# LANGUAGE BangPatterns #-}
+{-# LANGUAGE MagicHash #-}
+{-# LANGUAGE UnboxedTuples #-}
+
+module Limb where
+
+import Test.Tasty
+import qualified Test.Tasty.HUnit as H
+import qualified Test.Tasty.QuickCheck as Q
+import qualified Data.Word.Limb as L
+
diff --git a/test/Main.hs b/test/Main.hs
@@ -0,0 +1,38 @@
+{-# LANGUAGE BangPatterns #-}
+{-# LANGUAGE MagicHash #-}
+{-# LANGUAGE UnboxedTuples #-}
+
+module Main where
+
+import Test.Tasty
+import qualified Test.Tasty.HUnit as H
+import qualified Test.Tasty.QuickCheck as Q
+
+
+--division :: TestTree
+--division = testGroup "division" [
+-- Q.testProperty "division matches" $
+-- Q.withMaxSuccess 1000 div_matches
+-- , Q.testProperty "mod matches" $
+-- Q.withMaxSuccess 1000 mod_matches
+-- ]
+--
+--main :: IO ()
+--main = defaultMain $ testGroup "ppad-fixed" [
+-- testGroup "property tests" [
+-- add_sub
+-- , multiplication
+-- , division
+-- ]
+-- , testGroup "unit tests" [
+-- H.testCase "quotrem_r matches case0" quotrem_r_case0
+-- , H.testCase "quotrem_r matches case1" quotrem_r_case1
+-- , H.testCase "quotrem_r matches case2" quotrem_r_case2
+-- , H.testCase "recip_2by1 matches case0" recip_2by1_case0
+-- , H.testCase "recip_2by1 matches case1" recip_2by1_case1
+-- , H.testCase "quotrem_2by1 matches case0" quotrem_2by1_case0
+-- , H.testCase "quotrem_by1 matches case0" quotrem_by1_case0
+-- ]
+-- , W.tests
+-- ]
+--