diff options
author | Jan Christopher Vogt <oss.nsp@cvogt.org> | 2017-03-18 20:19:49 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-18 20:19:49 -0400 |
commit | 90ed56d6b6c2533efea1019ff05311e7338514fc (patch) | |
tree | 17d6620b3f0dfd8961e9a17cf60dce1552bd6d04 /test | |
parent | 0f30e3d611c24123206aa1ba270905ce1d099a61 (diff) | |
parent | 923fd231e0b2c22c0c60379da91066c0f544e83c (diff) | |
download | cbt-90ed56d6b6c2533efea1019ff05311e7338514fc.tar.gz cbt-90ed56d6b6c2533efea1019ff05311e7338514fc.tar.bz2 cbt-90ed56d6b6c2533efea1019ff05311e7338514fc.zip |
Merge pull request #443 from darthorimar/scalafix-plugin
Scalafix plugin
Diffstat (limited to 'test')
-rw-r--r-- | test/test.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/test.scala b/test/test.scala index 6c629bb..c092be8 100644 --- a/test/test.scala +++ b/test/test.scala @@ -222,6 +222,7 @@ object Main{ compile("../plugins/scalatest") compile("../plugins/wartremover") compile("../plugins/uber-jar") + compile("../plugins/scalafix") compile("../examples/scalafmt-example") compile("../examples/scalariform-example") compile("../examples/scalatest-example") @@ -233,6 +234,7 @@ object Main{ } compile("../examples/multi-standalone-example") compile("../examples/multi-combined-example") + compile("../examples/scalafix-example") if(sys.props("java.version").startsWith("1.7")){ System.err.println("\nskipping dotty tests on Java 7") } else { @@ -383,6 +385,19 @@ object Main{ assert(res.out.contains("via parent.parent: true 2"), res.out) } + { + val sourceFile = cbtHome / "examples" / "scalafix-example" / "Main.scala" + val sourceBefore = sourceFile.readAsString + val res = runCbt("../examples/scalafix-example", Seq("compile")) + assert(res.exit0) + val sourceAfter = sourceFile.readAsString + assert(sourceAfter contains "@volatile") + assert(sourceAfter contains ": Unit") + assert(sourceAfter contains ": String ") + assert(sourceAfter contains "import scala.collection.immutable") + lib.write(sourceFile, sourceBefore) + } + System.err.println(" DONE!") System.err.println( successes.toString ++ " succeeded, "++ failures.toString ++ " failed" ) if(failures > 0) System.exit(1) else System.exit(0) |