From c0ecdbc53bc37cabafb414a0eed008e14257df96 Mon Sep 17 00:00:00 2001 From: Jan Mas Rovira Date: Fri, 13 Sep 2024 15:45:07 +0200 Subject: [PATCH] add negative test --- test/Parsing/Negative.hs | 7 +++++++ tests/negative/NamedApplicationMissingAt.juvix | 8 ++++++++ 2 files changed, 15 insertions(+) create mode 100644 tests/negative/NamedApplicationMissingAt.juvix diff --git a/test/Parsing/Negative.hs b/test/Parsing/Negative.hs index 2743a84c23..fde6086e4b 100644 --- a/test/Parsing/Negative.hs +++ b/test/Parsing/Negative.hs @@ -82,6 +82,13 @@ parserErrorTests = $ \case ErrMegaparsec {} -> Nothing _ -> wrongError, + negTest + "Missing @ in named application" + $(mkRelDir ".") + $(mkRelFile "NamedApplicationMissingAt.juvix") + $ \case + ErrNamedApplicationMissingAt {} -> Nothing + _ -> wrongError, negTest "Error on local instances" $(mkRelDir ".") diff --git a/tests/negative/NamedApplicationMissingAt.juvix b/tests/negative/NamedApplicationMissingAt.juvix new file mode 100644 index 0000000000..fb23f72064 --- /dev/null +++ b/tests/negative/NamedApplicationMissingAt.juvix @@ -0,0 +1,8 @@ +module NamedApplicationMissingAt; + +type T := t; + +fun (a : T) + : T := t; + +main : T := fun {a := t};