Skip to content

Commit

Permalink
ivory-tasty: untick :->
Browse files Browse the repository at this point in the history
  • Loading branch information
sorki committed Dec 17, 2023
1 parent 253441c commit d6cffc8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions ivory-tasty/src/Ivory/Tasty.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
-- > someArtifacts :: [Located Artifact]
-- > someArtifacts = serializeArtifacts
--
-- > someTestedFunction :: Def ('[] ':-> Sint32)
-- > someTestedFunction :: Def ('[] :-> Sint32)
-- > someTestedFunction = proc "main" $ body $ do
-- > assert false
-- > ret 0
Expand Down Expand Up @@ -68,7 +68,7 @@ import Test.Tasty.HUnit (assertBool, testCase)

data IvoryTestCase = IvoryTestCase {
itcName :: String
, itcFun :: Def ('[] ':-> Sint32)
, itcFun :: Def ('[] :-> Sint32)
, itcDeps :: ModuleDef
, itcExpectSuccess :: Bool
}
Expand All @@ -77,15 +77,15 @@ data IvoryTestCase = IvoryTestCase {
-- expecting 0 exit code.
mkSuccess
:: String
-> Def ('[] ':-> Sint32)
-> Def ('[] :-> Sint32)
-> IvoryTestCase
mkSuccess name f = IvoryTestCase name f (pure ()) True

-- | Create `IvoryTestCase` from test name and function,
-- expecting non-0 exit code.
mkFailure
:: String
-> Def ('[] ':-> Sint32)
-> Def ('[] :-> Sint32)
-> IvoryTestCase
mkFailure name f = IvoryTestCase name f (pure ()) False

Expand Down
8 changes: 4 additions & 4 deletions ivory-tasty/test/Test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ main = defaultMain $ ivoryTestGroup [uartTypes] []
, setDeps (depend uartTypes) $ mkSuccess "test with dependencies" testDeps
]

testSmoke :: Def ('[] ':-> Sint32)
testSmoke :: Def ('[] :-> Sint32)
testSmoke = proc "main" $ body $ do
ret 0

testSmokeFailing :: Def ('[] ':-> Sint32)
testSmokeFailing :: Def ('[] :-> Sint32)
testSmokeFailing = proc "main" $ body $ do
ret 1

testAssertFailing :: Def ('[] ':-> Sint32)
testAssertFailing :: Def ('[] :-> Sint32)
testAssertFailing = proc "main" $ body $ do
assert false
ret 0

testDeps :: Def ('[] ':-> Sint32)
testDeps :: Def ('[] :-> Sint32)
testDeps = proc "main" $ body $ do
(a :: Ref s UARTBuffer) <- local $ stringInit "yolo"
lA <- deref (a ~> stringLengthL)
Expand Down

0 comments on commit d6cffc8

Please sign in to comment.