This module defines the datatype and operations for the Curry module tester "currytest".
Author: Michael Hanus
Version: May 2014
assertTrue
:: String -> Bool -> Assertion ()
(assertTrue s b)
asserts (with name s ) that b
must be true.
|
assertEqual
:: String -> a -> a -> Assertion a
(assertEqual s e1 e2)
asserts (with name s ) that e1
and e2
must be equal (w.r.t.
|
assertValues
:: String -> a -> [a] -> Assertion a
(assertValues s e vs)
asserts (with name s ) that vs
is the multiset
of all values of e .
|
assertSolutions
:: String -> (a -> Bool) -> [a] -> Assertion a
(assertSolutions s c vs)
asserts (with name s ) that constraint
abstraction c
has the multiset of solutions vs .
|
assertIO
:: String -> IO a -> a -> Assertion a
(assertIO s a r)
asserts (with name s ) that I/O action a
yields the result value r .
|
assertEqualIO
:: String -> IO a -> IO a -> Assertion a
(assertEqualIO s a1 a2)
asserts (with name s ) that I/O actions a1
and a2
yield equal (w.r.t.
|
seqStrActions
:: IO (String,Bool) -> IO (String,Bool) -> IO (String,Bool)
Combines two actions and combines their results. |
checkAssertion
:: (Eq a, Show a) => String -> ((String,Bool) -> IO (String,Bool)) -> Assertion a -> IO (String,Bool)
Executes and checks an assertion, and process the result by an I/O action. |
writeAssertResult
:: (String,Bool) -> IO Int
Prints the results of assertion checking. |
showTestMod
:: Int -> String -> IO ()
Sends message to GUI for showing test of a module. |
showTestCase
:: Int -> (String,Bool) -> IO (String,Bool)
Sends message to GUI for showing result of executing a test case. |
showTestEnd
:: Int -> IO ()
Sends message to GUI for showing end of module test. |
showTestCompileError
:: Int -> IO ()
Sends message to GUI for showing compilation errors in a module test. |
Datatype for defining test cases.
Constructors:
The messages sent to the test GUI. Used by the currytest tool.
Constructors:
TestModule
:: String -> ProtocolMsg
TestCase
:: String -> Bool -> ProtocolMsg
TestFinished
:: ProtocolMsg
TestCompileError
:: ProtocolMsg
|
|
|
|
|
|
Combines two actions and combines their results. Used by the currytest tool.
|
Executes and checks an assertion, and process the result by an I/O action. Used by the currytest tool.
|
Prints the results of assertion checking. If failures occurred, the return code is positive. Used by the currytest tool. |
Sends message to GUI for showing test of a module. Used by the currytest tool. |
Sends message to GUI for showing result of executing a test case. Used by the currytest tool. |
Sends message to GUI for showing end of module test. Used by the currytest tool. |
Sends message to GUI for showing compilation errors in a module test. Used by the currytest tool. |