-
Notifications
You must be signed in to change notification settings - Fork 37
Add snapshot / unit tests #27
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
Conversation
…napshot tests for lexical constructs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic work! I am very excited about having tests, this will make code reviewing changes in the future much easier :)
The text format of the assertions is nice, very easy to read. I am wondering, would it be possible to auto-generate the assertions given a plain Scala source file? We might be able to use the auto-generated assertion files as expect outputs instead of the JSON files. Expect tests should ideally have human readable output files so that the diffs are easier to review.
Well, yes. This is what I tried to do at first attempt :) But I think I got some aggregation wrong and end up having overlapping tokens, then I abandoned the idea. Now I looked at it again and I think it's totaly possible. This is how it's gonna look like:
I'll update this pull request once I finished |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 Thank you @PanAeon for your hard work.
@@ -0,0 +1,495 @@ | |||
> | |||
>object ExampleIdentifiers { | |||
#^^^^^^ source.scala keyword.declaration.scala |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😍 This looks great!
Hi,
I have added some basic unit tests and also some snapshot tests.
Almost all of the code examples I took from the scala spec.
Related Issue #26