-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add regression test for Copilot-Language/copilot#431
- Loading branch information
1 parent
b399ebc
commit b37d83b
Showing
3 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
copilot-verifier/examples/Copilot/Verifier/Examples/ShouldPass/ArrayTriggerArgument.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{-# LANGUAGE DataKinds #-} | ||
|
||
-- | A regression test for | ||
-- <https://github.com/Copilot-Language/copilot/issues/431>. | ||
module Copilot.Verifier.Examples.ShouldPass.ArrayTriggerArgument where | ||
|
||
import Language.Copilot | ||
import Copilot.Compile.C99 | ||
import Copilot.Verifier ( Verbosity, VerifierOptions(..) | ||
, defaultVerifierOptions, verifyWithOptions ) | ||
|
||
spec :: Spec | ||
spec = trigger "f" true [arg stream] | ||
where | ||
stream :: Stream (Array 2 Int16) | ||
stream = constant (array [3,4]) | ||
|
||
verifySpec :: Verbosity -> IO () | ||
verifySpec verb = do | ||
spec' <- reify spec | ||
verifyWithOptions | ||
defaultVerifierOptions{verbosity = verb} | ||
mkDefaultCSettings [] "arrayTriggerArgument" spec' |