{- |
Module      : Main
Copyright   : (c) Leon Vatthauer, 2026
License     : GPL-3
Maintainer  : Leon Vatthauer <leon.vatthauer@fau.de>
Stability   : experimental
Portability : non-portable (GHC extensions)

Entry point for testing. Runs the test suite using the
<https://hackage.haskell.org/package/tasty Tasty> framework.

QuickCheck is configured with:

* 'coverageReporter': shows code coverage.
* v'QuickCheckTests' @500@ — number of tests run per property.
* v'QuickCheckMaxRatio' @50@ — maximum ratio of discarded tests before a property is abandoned.
-}
module Main where

import FOLTest
import ProofSyntax
import Test.Tasty
import Test.Tasty.CoverageReporter
import Test.Tasty.QuickCheck

-- | Runs tests via Tasty
main :: IO ()
IO ()
main =
  [Ingredient] -> TestTree -> IO ()
defaultMainWithIngredients (Ingredient
coverageReporter Ingredient -> [Ingredient] -> [Ingredient]
forall a. a -> [a] -> [a]
: [Ingredient]
defaultIngredients) (TestTree -> IO ()) -> TestTree -> IO ()
forall a b. (a -> b) -> a -> b
$
    QuickCheckTests -> TestTree -> TestTree
forall v. IsOption v => v -> TestTree -> TestTree
localOption (Int -> QuickCheckTests
QuickCheckTests Int
500) (TestTree -> TestTree) -> TestTree -> TestTree
forall a b. (a -> b) -> a -> b
$
      QuickCheckMaxRatio -> TestTree -> TestTree
forall v. IsOption v => v -> TestTree -> TestTree
localOption (Int -> QuickCheckMaxRatio
QuickCheckMaxRatio Int
50) (TestTree -> TestTree) -> TestTree -> TestTree
forall a b. (a -> b) -> a -> b
$
        TestName -> [TestTree] -> TestTree
testGroup TestName
"Tests" [TestTree
proofTests, TestTree
verificationTests]