forked from omelkonian/agda-minimal-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ignore generated *.agdai files * export Backend from Main * move Main from src => app * change cabal config add library and test-suite * fix warnings in Backend * test if backend is enabled * add tests to CI * update README with info how to run tests * changelog for 0.1.0.2 * add missing newline in Main.hs
- Loading branch information
Showing
8 changed files
with
89 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ _build | |
dist | ||
dist-newstyle | ||
*~ | ||
**/*.agdai |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module Main where | ||
|
||
import Agda.Compiler.Rust.Backend ( runRustBackend ) | ||
|
||
main :: IO () | ||
main = runRustBackend |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
module Main (main) where | ||
|
||
import Agda.Compiler.Rust.Backend ( backend, defaultOptions ) | ||
import Test.HUnit ( | ||
Test(..) | ||
, assertEqual | ||
, failures | ||
, runTestTT) | ||
import System.Exit ( exitFailure , exitSuccess ) | ||
import Agda.Compiler.Backend ( isEnabled ) | ||
|
||
testIsEnabled :: Test | ||
testIsEnabled = TestCase | ||
(assertEqual "isEnabled" (isEnabled backend defaultOptions) True) | ||
|
||
tests :: Test | ||
tests = TestList [TestLabel "rustBackend" testIsEnabled] | ||
|
||
main :: IO () | ||
main = do | ||
result <- runTestTT tests | ||
if failures result > 0 then exitFailure else exitSuccess |