Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: fix parsing of karlheinz.brat; extend let.brat #71

Merged
merged 2 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion brat/examples/karlheinz.brat
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ answer = energy(results)
evaluate(obs :: Observable
,q :: Quantity
,a :: Ansatz
,rs :: List Real
,rs :: List(Real)
) -> Real
evaluate = ?eval

Expand Down
10 changes: 10 additions & 0 deletions brat/examples/let.brat
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,13 @@ nums' = let xs = map(inc, [0,2,3]) in xs

nums'' :: List(Int)
nums'' = let i2 = {inc; inc} in map(i2, xs)

dyad :: Int, Bool
dyad = 42, true

bind2 :: Bool
bind2 = let i, b = dyad in b

-- It shouldn't matter if we put brackets in the binding sites
bind2' :: Bool
bind2' = let (i, b) = dyad in b
1 change: 1 addition & 0 deletions brat/test/Test/Checking.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import Test.Tasty.HUnit
import Test.Tasty.Silver

expectedCheckingFails = map ("examples" </>) ["nested-abstractors.brat"
,"karlheinz.brat"
,"karlheinz_alias.brat"
,"hea.brat"
]
Expand Down
4 changes: 1 addition & 3 deletions brat/test/Test/Parsing.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ testParse file = testCase (show file) $ do
Left err -> assertFailure (show err)
Right _ -> return () -- OK

expectedParsingFails = map ("examples" </>) [
"karlheinz.brat",
"thin.brat"]
expectedParsingFails = ["examples" </> "thin.brat"]

parseXF = expectFailForPaths expectedParsingFails testParse

Expand Down
Loading