This module defines the datatype and operations for the
Curry module tester "currytest".
Author: Michael Hanus
Version: May 2006
| Exported names: |
Datatypes:
Assertion
| ProtocolMsg
Constructors:
AssertEqual
| AssertEqualIO
| AssertIO
| AssertSolutions
| AssertTrue
| AssertValues
| TestCase
| TestCompileError
| TestFinished
| TestModule
Functions:
checkAssertion
| seqStrActions
| showTestCase
| showTestCompileError
| showTestEnd
| showTestMod
| writeAssertResult
| Summary of exported functions: |
|
||
|
||
|
||
|
||
|
||
|
||
|
| Imported modules: |
| Exported datatypes: |
Datatype for defining test cases.
Constructors:
:: String -> Bool -> Assertion a
AssertTrue s b - assert (with name s) that b must be true
:: String -> a -> a -> Assertion a
AssertEqual s e1 e2 - assert (with name s) that e1 and e2 must
be equal (w.r.t. ==)
:: String -> a -> [a] -> Assertion a
AssertValues s e vs - assert (with name s) that vs is the multiset
of all values of e (i.e., all values of e are
compared with the elements in vs w.r.t. ==)
:: String -> (a -> Success) -> [a] -> Assertion a
AssertSolutions s c vs - assert (with name s) that constraint
abstraction c has the multiset of solutions vs
(i.e., the solutions of c are compared with the elements in vs w.r.t. ==)
:: String -> (IO a) -> a -> Assertion a
AssertIO s a r - assert (with name s) that I/O action a
yields the result value r
:: String -> (IO a) -> (IO a) -> Assertion a
AssertEqualIO s a1 a2 - assert (with name s) that I/O actions a1 and
a2 yield equal (w.r.t. ==) results
The messages sent to the test GUI. Used by the currytest tool.
Constructors:
:: String -> ProtocolMsg
:: String -> Bool -> ProtocolMsg
:: ProtocolMsg
:: ProtocolMsg
| Exported functions: |
:: IO (String,Bool) -> IO (String,Bool) -> IO (String,Bool)
Combines two actions and combines their results. Used by the currytest tool.
:: ((String,Bool) -> IO (String,Bool)) -> Assertion a -> IO (String,Bool)
Executes and checks an assertion, and process the result by an I/O action. Used by the currytest tool.
Example call: (checkAssertion protocol assertion)
protocol
- an action to be applied after test execution
assertion
- an assertion to be tested
:: (String,Bool) -> IO ()
Writes the results of assertion checking into a file and stdout, if the results are non-empty. Used by the currytest tool.
:: String -> String -> IO ()
Sends message to GUI for showing test of a module. Used by the currytest tool.
:: String -> (String,Bool) -> IO (String,Bool)
Sends message to GUI for showing result of executing a test case. Used by the currytest tool.
:: String -> IO ()
Sends message to GUI for showing end of module test. Used by the currytest tool.
:: String -> IO ()
Sends message to GUI for showing compilation errors in a module test. Used by the currytest tool.