From e076b6a19a612413bbcb7bbf343e7a0e7bede178 Mon Sep 17 00:00:00 2001 From: gnumonik Date: Tue, 26 Mar 2024 18:52:13 -0400 Subject: [PATCH] fixed some tests --- tests/TestPurus.hs | 6 +++--- tests/purus/passing/Misc/output/Lib/fakeminus.plc | 1 + tests/purus/passing/Misc/output/Lib/main.plc | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 tests/purus/passing/Misc/output/Lib/fakeminus.plc create mode 100644 tests/purus/passing/Misc/output/Lib/main.plc diff --git a/tests/TestPurus.hs b/tests/TestPurus.hs index d72a0280..ab03508b 100644 --- a/tests/TestPurus.hs +++ b/tests/TestPurus.hs @@ -25,15 +25,15 @@ shouldPassTests = do traverse_ runPurusDefault shouldPass let misc = "./tests/purus/passing/Misc/output/Lib/index.cfn" uplc1 <- declToUPLC misc "main" + writeFile "./tests/purus/passing/Misc/output/Lib/main.plc" (show uplc1) + uplc2 <- declToUPLC misc "minus" + writeFile "./tests/purus/passing/Misc/output/Lib/fakeminus.plc" (show uplc2) defaultMain $ runPLCProgramTest "mainTest" (EvaluationSuccess (Constant () (Some (ValueOf DefaultUniInteger 2))),[]) misc "main" - writeFile "./tests/purus/passing/Misc/output/Lib/main.plc" (show uplc1) - uplc2 <- declToUPLC misc "minus" - writeFile "./tests/purus/passing/Misc/output/Lib/fakeminus.plc" (show uplc2) runPurus :: P.CodegenTarget -> FilePath -> IO () runPurus target dir = do diff --git a/tests/purus/passing/Misc/output/Lib/fakeminus.plc b/tests/purus/passing/Misc/output/Lib/fakeminus.plc new file mode 100644 index 00000000..b128c4f5 --- /dev/null +++ b/tests/purus/passing/Misc/output/Lib/fakeminus.plc @@ -0,0 +1 @@ +Program {_progAnn = Original (), _progVer = Version {_versionMajor = 1, _versionMinor = 1, _versionPatch = 0}, _progTerm = LamAbs (Original ()) (Name {_nameText = "v", _nameUnique = Unique {unUnique = 86}}) (TyBuiltin (Original ()) (SomeTypeIn DefaultUniInteger)) (LamAbs (Original ()) (Name {_nameText = "v1", _nameUnique = Unique {unUnique = 87}}) (TyBuiltin (Original ()) (SomeTypeIn DefaultUniInteger)) (Constant (Original ()) (Some (ValueOf DefaultUniInteger 42))))} \ No newline at end of file diff --git a/tests/purus/passing/Misc/output/Lib/main.plc b/tests/purus/passing/Misc/output/Lib/main.plc new file mode 100644 index 00000000..9c872e41 --- /dev/null +++ b/tests/purus/passing/Misc/output/Lib/main.plc @@ -0,0 +1 @@ +Program {_progAnn = Original (), _progVer = Version {_versionMajor = 1, _versionMinor = 1, _versionPatch = 0}, _progTerm = Constant (Original ()) (Some (ValueOf DefaultUniInteger 2))} \ No newline at end of file