Skip to content

Conversation

@allanrenucci
Copy link
Contributor

This is an alternative test suite to the one in #3987. I think we should rely on simple and small tests for syntax highlighting and not files.

The implementation is adapted from https://github.com/lihaoyi/Ammonite/blob/master/amm/repl/src/test/scala/ammonite/unit/HighlightTests.scala

@allanrenucci allanrenucci requested a review from smarter May 2, 2018 13:31
Copy link
Member

@smarter smarter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@smarter
Copy link
Member

smarter commented May 2, 2018

@benkobalog Looks like we could use this instead of your proposed SyntaxHighlightingTests, what do you think?

@benkobalog
Copy link
Contributor

@smarter I think it's a good idea to use this simpler solution.
Probably there won't be a huge amount of syntax highlighting tests, so simplicity/speed seems to be the better option over test case readability. Even if readability would be a problem it's easy to make a function which inverts the transformation and writes it to a file or prints errors in the tests.

I can modify my PR to use this method instead, after this is merged.

@allanrenucci
Copy link
Contributor Author

@benkobalog I am merging this then

@allanrenucci allanrenucci merged commit 4ca71e0 into scala:master May 2, 2018
@Blaisorblade Blaisorblade deleted the syntax-hl-tests branch May 2, 2018 16:25
benkobalog added a commit to benkobalog/dotty that referenced this pull request May 3, 2018
Added comments to updateLastToken function
Use syntax highlight tests proposed in pr scala#4441
instead of the file based solution
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants