Skip to content

Commit 1f16c35

Browse files
Import Oughta qualified (instead of as Ota) in test suite
1 parent 688a9b4 commit 1f16c35

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

grease-cli/tests/Main.hs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ import Control.Monad.IO.Class (MonadIO, liftIO)
4949

5050
import qualified Options.Applicative as Opt
5151

52-
import Oughta qualified as Ota
52+
import Oughta qualified
5353
import qualified Lumberjack as LJ
5454

5555
import qualified Test.Tasty as T
@@ -473,7 +473,7 @@ withCapturedLogs withLogAction = do
473473
oughta ::
474474
(SimOpts -> GreaseLogAction -> IO Results) ->
475475
FilePath ->
476-
Ota.LuaProgram ->
476+
Oughta.LuaProgram ->
477477
IO ()
478478
oughta go path prog0 = do
479479
opts <- getNonExeTestOpts path []
@@ -482,7 +482,7 @@ oughta go path prog0 = do
482482
res <- go opts la'
483483
logResults la' res
484484
Text.IO.writeFile (FilePath.replaceExtension path "out") logTxt
485-
let output = Ota.Output (Text.encodeUtf8 logTxt)
485+
let output = Oughta.Output (Text.encodeUtf8 logTxt)
486486
let prelude =
487487
Text.unlines
488488
[ "function ok() check 'All goals passed!' end"
@@ -494,12 +494,12 @@ oughta go path prog0 = do
494494
, "function no_heuristic() check 'Unable to find a heuristic for any goal' end"
495495
, "function uninit_stack() check 'Likely bug: uninitialized stack read' end"
496496
]
497-
let prog = Ota.addPrefix prelude prog0
498-
Ota.Result r <- Ota.check prog output
497+
let prog = Oughta.addPrefix prelude prog0
498+
Oughta.Result r <- Oughta.check prog output
499499
case r of
500500
Left f -> throwIO f
501501
Right s ->
502-
let ms = Ota.successMatches s in
502+
let ms = Oughta.successMatches s in
503503
T.U.assertBool "Test has some assertions" (not (Seq.null ms))
504504

505505
-- | Make an "Oughta"-based test for an S-expression program
@@ -514,7 +514,7 @@ oughtaSexp go dir fileName =
514514
T.U.testCase (FilePath.dropExtension (FilePath.dropExtension fileName)) $ do
515515
let path = dir </> fileName
516516
content <- Text.IO.readFile path
517-
let prog = Ota.fromLineComments path ";; " content
517+
let prog = Oughta.fromLineComments path ";; " content
518518
oughta go path prog
519519

520520
findWithExt :: FilePath -> String -> IO [FilePath]
@@ -543,7 +543,7 @@ oughtaBc go dir fileName =
543543
T.U.testCase dropped $ do
544544
let path = dir </> FilePath.addExtension dropped "c"
545545
content <- Text.IO.readFile path
546-
let prog = Ota.fromLineComments path "/// " content
546+
let prog = Oughta.fromLineComments path "/// " content
547547
oughta go (dir </> fileName) prog
548548

549549
llvmBcTests :: IO T.TestTree

0 commit comments

Comments
 (0)