cryptol-2.2.6: Cryptol: The Language of Cryptography

Copyright | (c) 2013-2015 Galois, Inc.
License | BSD3
Maintainer | cryptol@galois.com
Stability | provisional
Portability | portable
Safe Haskell | Safe
Language | Haskell98

Cryptol.Testing.Eval

Description

Evaluate test cases and handle exceptions appropriately

Synopsis

- data TestResult
  - = Pass
  - | FailFalse [Value]
  - | FailError EvalError [Value]
- runOneTest :: Value -> [Value] -> IO TestResult

# Documentation

data TestResult Source

A test result is either a pass, a failure due to evaluating to `False`, or a failure due to an exception raised during evaluation

Constructors

Pass |
FailFalse [Value] |
FailError EvalError [Value] |

runOneTest :: Value -> [Value] -> IO TestResult Source

Apply a testable value to some arguments. Note that this function assumes that the values come from a call to `testableType` (i.e., things are type-correct). We run in the IO monad in order to catch any `EvalError`s.