We are planning to upgrade GitLab to the latest version this Friday morning. Expect some downtime!

Commit e406ffac authored by Bas Lijnse's avatar Bas Lijnse

Updated to deal with changed interface in Testing.TestEvents.

parent 08cd7314
......@@ -9,7 +9,8 @@ import iTasks.Extensions.Development.Tools
import iTasks.Extensions.Development.Codebase
import Text, Data.Tuple, Data.Error, Data.Func, System.FilePath, System.OS
derive class iTask EndEventType
derive class iTask EndEventType, Expression
derive gEditor EndEvent, FailReason, FailedAssertion, CounterExample, Relation
derive gText EndEvent, FailReason, FailedAssertion, CounterExample, Relation
derive gDefault EndEvent, FailReason, FailedAssertion, CounterExample, Relation
......
......@@ -62,13 +62,13 @@ assertEqualWorld name exp sut = {UnitTest|name=name,test=test}
where
test w
# (res,w) = sut w
= (if (exp === res) Passed (Failed (Just (FailedAssertions [ExpectedRelation (toJSON exp) Eq (toJSON res)]))),w)
= (if (exp === res) Passed (Failed (Just (FailedAssertions [ExpectedRelation (JSON (toJSON exp)) Eq (JSON (toJSON res))]))),w)
checkEqual :: a a -> EndEventType | gEq{|*|} a & JSONEncode{|*|} a
checkEqual exp sut = checkEqualWith (===) exp sut
checkEqualWith :: (a a -> Bool) a a -> EndEventType | JSONEncode{|*|} a
checkEqualWith pred exp sut = if (pred exp sut) Passed (Failed (Just (FailedAssertions [ExpectedRelation (toJSON exp) Eq (toJSON sut)])))
checkEqualWith pred exp sut = if (pred exp sut) Passed (Failed (Just (FailedAssertions [ExpectedRelation (JSON (toJSON exp)) Eq (JSON (toJSON sut))])))
pass :: String -> UnitTest
pass name = {UnitTest|name=name,test = \w -> (Passed,w)}
......
......@@ -36,7 +36,7 @@ EXAMPLE_MODULES :== ["../Examples/BasicApiExamples.icl"
,"../Examples/GIS/LeafletMapExample.icl"
]
derive class iTask EndEventType
derive class iTask EndEventType, Expression
derive gEditor EndEvent, FailReason, FailedAssertion, CounterExample, Relation
derive gDefault EndEvent, FailReason, FailedAssertion, CounterExample, Relation
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment