diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2025-04-15 21:59:08 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2025-04-15 22:03:52 +0200 |
commit | f0eed671c65a31eeb34ece14547bea79eb753728 (patch) | |
tree | a4428aed04cf8b18476dc580c56dcf2a11b7f21f /src/Test/Builtins.hs | |
parent | b493a9be142e15ebd1cb32c61b0fd2ac39b703c3 (diff) |
Parametrize test block with return type
Diffstat (limited to 'src/Test/Builtins.hs')
-rw-r--r-- | src/Test/Builtins.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Test/Builtins.hs b/src/Test/Builtins.hs index 723b480..69579bc 100644 --- a/src/Test/Builtins.hs +++ b/src/Test/Builtins.hs @@ -33,7 +33,7 @@ getArgVars (FunctionArguments args) kw = do builtinSend :: SomeVarValue builtinSend = SomeVarValue $ VarValue [] (FunctionArguments $ M.fromList atypes) $ - \_ args -> TestBlock [ Send (getArg args (Just "to")) (getArg args Nothing) ] + \_ args -> TestBlockStep EmptyTestBlock $ Send (getArg args (Just "to")) (getArg args Nothing) where atypes = [ ( Just "to", SomeArgumentType (ContextDefault @Process) ) @@ -42,7 +42,7 @@ builtinSend = SomeVarValue $ VarValue [] (FunctionArguments $ M.fromList atypes) builtinFlush :: SomeVarValue builtinFlush = SomeVarValue $ VarValue [] (FunctionArguments $ M.fromList atypes) $ - \_ args -> TestBlock [ Flush (getArg args (Just "from")) (getArgMb args (Just "matching")) ] + \_ args -> TestBlockStep EmptyTestBlock $ Flush (getArg args (Just "from")) (getArgMb args (Just "matching")) where atypes = [ ( Just "from", SomeArgumentType (ContextDefault @Process) ) @@ -51,7 +51,7 @@ builtinFlush = SomeVarValue $ VarValue [] (FunctionArguments $ M.fromList atypes builtinGuard :: SomeVarValue builtinGuard = SomeVarValue $ VarValue [] (FunctionArguments $ M.singleton Nothing (SomeArgumentType (RequiredArgument @Bool))) $ - \sline args -> TestBlock [ Guard sline (getArgVars args Nothing) (getArg args Nothing) ] + \sline args -> TestBlockStep EmptyTestBlock $ Guard sline (getArgVars args Nothing) (getArg args Nothing) builtinWait :: SomeVarValue -builtinWait = someConstValue $ TestBlock [ Wait ] +builtinWait = someConstValue $ TestBlockStep EmptyTestBlock Wait |