Uh oh!
There was an error while loading. Please reload this page.
Baseline parser tests - #14721
Conversation
There was a problem hiding this comment.
@nojaf This is really cool!
Maybe we could move the files into subfolders, mimicking the file structure that was there before:
tests/service/data/SyntaxTree/Type/...
tests/service/data/SyntaxTree/Expression/...
tests/service/data/SyntaxTree/ModuleOrNamespace/...
We'll likely add a lot of these files, so maybe we could have some organization strategy from the start.
Otherwise, we could have this kind of structure in the file names, but I think it'll be much more difficult to maintain when there're many contributors.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
__SOURCE_DIRECTORY__ usage.
nojaf
commented
Feb 9, 2023
@auduchinok I took a shortcut for |
| [<TestCaseSource(nameof allTestCases)>] | ||
| let ParseFile fileName = |
There was a problem hiding this comment.
Is there an easy way to run/debug a specific test? It's going to be crucial when debugging some cases in the parser (e.g. debugging helped me a lot when I worked on the parser in #13352).
It would also be very handy to be able to dump tokens for a specific tests easily: it may really help when changing LexFilter, as in #13089.
@nojaf@vzarytovskii Would it be easy to have separate named tests, similar to what we have here? https://github.com/JetBrains/resharper-fsharp/blob/net231/ReSharper.FSharp/test/src/FSharp.Tests/Parsing/FSharpParserTest.fs

This is a first attempt at tackling #13484.
I migrated the existing parser tests (which asserted patterns in the AST) with baseline tests.
These tests will be more interesting to detect regressions early on.