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

FileDiffSuite should be published along with lms #103

Open
manojo opened this issue Sep 8, 2015 · 4 comments
Open

FileDiffSuite should be published along with lms #103

manojo opened this issue Sep 8, 2015 · 4 comments
Labels

Comments

@manojo
Copy link
Collaborator

manojo commented Sep 8, 2015

Given that it is the standard way of testing generated code, it makes sense that FileDiffSuite is available to everyone who uses LMS. As in general it is bad practice to publish test folders and files, I suggest having a test-utils package to which FileDiffSuite belongs.

@manojo manojo added the feature label Sep 8, 2015
@TiarkRompf
Copy link
Owner

Good idea. It would also be good to (1) update this to something that doesn't produce deprecation warnings and (2) harmonize it with the tutorial repo.

But unfortunately we can't just put FileDiffSuite into the main (i.e. non-test) source tree because that would introduce a dependency on scala-test from the main sources, which also seems like bad practice.

@manojo
Copy link
Collaborator Author

manojo commented Sep 10, 2015

Good point. At the moment, even the current lms build should be changed for not depending on scalatest though. Looking here we see the dependency. We should indeed add an extra % "test" for the right scope:

libraryDependencies += ("org.scalatest" % "scalatest_2.11" % "2.2.2" % "test")

A possibility would be to create a separate project for testutils, which the main sources would depend on. Something along the following lines.

Removing deprecation warnings seems not too hard. It's about extending Spec instead of Suite and adding specific whitespaces in methods we want to be tested, as per the documentation.

@manojo
Copy link
Collaborator Author

manojo commented Sep 10, 2015

Ideally, of course, we'd much rather use partest, but it currently does not support virtualized-2.11 IIRC.

@TiarkRompf
Copy link
Owner

A testutils package seems like a good idea once we have things like e.g. random testing (which @GeorgOfenbeck is working on) but just for FileDiffSuite it seems a bit heavyweight.

My suggestion would be to try and see if the relevant bits of FileDiffSuite can be factored out into a utility class that does not depend on ScalaTest. I think the tutorial repo almost does this.

Good point about the % test. Send a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants