Copyright | (c) Eric Crockett 2011-2017 Chris Peikert 2011-2017 |
---|---|
License | GPL-3 |
Maintainer | ecrockett0@email.com |
Stability | experimental |
Portability | POSIX \( \def\C{\mathbb{C}} \) |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- defaultZqTests :: Test
- cycTests :: (forall m r. (Fact m, Eq r) => Eq (t m r), forall m r. (Fact m, Show r) => Show (t m r), _) => Proxy t -> Test
- cpxTensorTests :: _ => Proxy t -> Test
- dblTensorTests :: _ => Proxy t -> Test
- int64TensorTests :: _ => Proxy t -> Test
- zqTensorTests :: _ => Proxy t -> Test
- tensorCrtTests1 :: forall t m r. _ => Gen r -> Gen (t m r) -> Test
- tensorCrtTests2 :: forall t m m' r. _ => Proxy '(t, m, m', r) -> Gen (t m r) -> Test
- tensorTests1 :: forall t m r. _ => Gen (t m r) -> Test
- tensorTests2 :: forall t m m' r. _ => Proxy '(t, m, m', r) -> Gen (t m r) -> Test
- cycTests1 :: forall t m r. (Fact m, _) => Gen (Cyc t m r) -> Test
- cycTests2 :: forall t m m' r. _ => Proxy '(t, m, m', r) -> Gen (Cyc t m' r) -> Test
- zqTests :: forall r. (Mod r, _) => Proxy r -> Test
- nestGroup :: String -> [Gen a -> Test] -> Gen a -> Test
- testIOWithGen :: (Show a, Testable prop) => String -> (a -> IO prop) -> Gen a -> Test
- testIOWithoutGen :: Testable prop => String -> IO prop -> Test
- testWithGen :: (Show a, Testable prop) => String -> (a -> prop) -> Gen a -> Test
- testWithoutGen :: Testable prop => String -> prop -> Test
- class ApproxEqual a where
- choose :: Random a => (a, a) -> Gen a
- chooseAny :: Random a => Gen a
- testGroup :: TestName -> [Test] -> Test
- data Gen a
- data Test
- module Crypto.Lol.Utils.ShowType
Default parameters for tests
defaultZqTests :: Test Source #
Default parameters for ZqBasic
tests.
cycTests :: (forall m r. (Fact m, Eq r) => Eq (t m r), forall m r. (Fact m, Show r) => Show (t m r), _) => Proxy t -> Test Source #
cpxTensorTests :: _ => Proxy t -> Test Source #
dblTensorTests :: _ => Proxy t -> Test Source #
int64TensorTests :: _ => Proxy t -> Test Source #
zqTensorTests :: _ => Proxy t -> Test Source #
Tests for different layers of Lol
tensorTests1 :: forall t m r. _ => Gen (t m r) -> Test Source #
cycTests1 :: forall t m r. (Fact m, _) => Gen (Cyc t m r) -> Test Source #
Tests for single-index Cyc
operations. There must be a CRT basis for \(O_m\) over r
.
cycTests2 :: forall t m m' r. _ => Proxy '(t, m, m', r) -> Gen (Cyc t m' r) -> Test Source #
Tests for inter-ring Cyc
operations. There must be a CRT basis for \(O_{m'}\) over r
.
zqTests :: forall r. (Mod r, _) => Proxy r -> Test Source #
Tests for modular arithmetic implementations.
Utilities for creating tests
testIOWithGen :: (Show a, Testable prop) => String -> (a -> IO prop) -> Gen a -> Test Source #
Make a Test
given a name, a monadic (IO only) testing function, and a parameter generator
testIOWithoutGen :: Testable prop => String -> IO prop -> Test Source #
Make a Test
given a name and a monadic (IO only) Testable
value
testWithGen :: (Show a, Testable prop) => String -> (a -> prop) -> Gen a -> Test Source #
Make a Test
given a name, a testing function, and a parameter generator
testWithoutGen :: Testable prop => String -> prop -> Test Source #
Make a Test
given a name and a Testable
value
class ApproxEqual a where Source #
Instances
ApproxEqual Double Source # | |
ApproxEqual Int64 Source # | |
ApproxEqual (Complex Double) Source # | |
Eq r => ApproxEqual (ZqBasic q r) Source # | |
A generator for values of type a
.
The third-party packages
QuickCheck-GenT
and
quickcheck-transformer
provide monad transformer versions of Gen
.
Main test data type: builds up a list of tests to be run. Users should use the
utility functions in e.g. the test-framework-hunit and test-framework-quickcheck2
packages to create instances of Test
, and then build them up into testsuites
by using testGroup
and lists.
For an example of how to use test-framework, please see http://github.com/batterseapower/test-framework/raw/master/example/Test/Framework/Example.lhs
Utilities for showing benchmark results
module Crypto.Lol.Utils.ShowType