1
1
mirror of https://github.com/anoma/juvix.git synced 2025-01-03 21:14:16 +03:00

Add negative test for AppLeftImplicit error (#154)

This commit is contained in:
janmasrovira 2022-06-14 08:56:48 +02:00 committed by GitHub
parent 9eeeb0f95b
commit b09d4602e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View File

@ -24,7 +24,7 @@ testDescr NegTest {..} =
_testRoot = tRoot,
_testAssertion = Single $ do
let entryPoint = defaultEntryPoint _file
res <- runIOEither (upToScoping entryPoint)
res <- runIOEither (upToAbstract entryPoint)
case mapLeft fromMiniJuvixError res of
Left (Just err) -> whenJust (_checkErr err) assertFailure
Left Nothing -> assertFailure "The scope checker did not find an error."
@ -175,6 +175,13 @@ tests =
$ \case
ErrWrongLocationCompileBlock {} -> Nothing
_ -> wrongError,
NegTest
"Implicit argument on the left of an application"
"."
"AppLeftImplicit.mjuvix"
$ \case
ErrAppLeftImplicit {} -> Nothing
_ -> wrongError,
NegTest
"Multiple compile blocks for the same name"
"CompileBlocks"

View File

@ -0,0 +1,6 @@
module AppLeftImplicit;
x : Type;
x ≔ {x};
end;