diff options
| author | Arnaud Bailly <arnaud@pankzsoft.com> | 2026-03-22 13:16:21 +0100 |
|---|---|---|
| committer | Arnaud Bailly <arnaud@pankzsoft.com> | 2026-03-22 13:16:21 +0100 |
| commit | 4fed459d89b6b3abcce8028b19af806b48a38bd7 (patch) | |
| tree | e3bec85996ad03286b261d8f32eb456e35b164e0 /lambda-calcul/haskell/test/Minilang/IntegrationSpec.hs | |
| parent | afb965ca75a106063c36195a1c180baebe610115 (diff) | |
| download | lambda-nantes-4fed459d89b6b3abcce8028b19af806b48a38bd7.tar.gz | |
Add builtin arithmetic operators
* also allow choosing evaluator
* ensures equivalence of evaluators up-to α-renaming
* checks server accepts answers from challenge
Diffstat (limited to 'lambda-calcul/haskell/test/Minilang/IntegrationSpec.hs')
| -rw-r--r-- | lambda-calcul/haskell/test/Minilang/IntegrationSpec.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lambda-calcul/haskell/test/Minilang/IntegrationSpec.hs b/lambda-calcul/haskell/test/Minilang/IntegrationSpec.hs index fa87cef..ef05e20 100644 --- a/lambda-calcul/haskell/test/Minilang/IntegrationSpec.hs +++ b/lambda-calcul/haskell/test/Minilang/IntegrationSpec.hs @@ -7,6 +7,7 @@ import Data.Aeson (eitherDecodeFileStrict) import Data.Proxy (Proxy (..)) import Data.Text (Text) import Minilang.API +import Minilang.REPL.Types (Evaluator (..)) import Minilang.Server (Server (..), startServer, stopServer) import Network.HTTP.Client (defaultManagerSettings, newManager) import Servant.API ((:<|>) (..)) @@ -24,7 +25,6 @@ leaderboardClient :: ClientM [Score] scoreClient :: Maybe Token -> ClientM Score challengeClient :: Maybe Token -> ClientM Challenge answerClient :: Maybe Token -> Text -> ClientM () - registerClient :<|> unregisterClient :<|> leaderboardClient @@ -57,7 +57,7 @@ runC env action = spec :: Spec spec = - around withServer $ + around (withServer DeBruijn) $ describe "Full contest integration" $ do it "Alice can solve all challenges and reach the maximum grade" $ \Server{serverPort} -> do @@ -102,5 +102,5 @@ solveChallenge env token Challenge{level, answer} = do -- | Spawn the real server (which itself reads challenges.json and picks a -- free port) and tear it down after the test. -withServer :: (Server -> IO ()) -> IO () -withServer = bracket (startServer 0) stopServer +withServer :: Evaluator -> (Server -> IO ()) -> IO () +withServer evaluator = bracket (startServer 0 evaluator) stopServer |
