Skip to content

Commit

Permalink
add test case for test module in GenIdea
Browse files Browse the repository at this point in the history
  • Loading branch information
rockjam committed Apr 15, 2018
1 parent ad7666f commit a145abc
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scalalib/test/resources/gen-idea/idea/modules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea_modules/mill-build.iml" filepath="$PROJECT_DIR$/.idea_modules/mill-build.iml"/>
<module fileurl="file://$PROJECT_DIR$/.idea_modules/.iml" filepath="$PROJECT_DIR$/.idea_modules/.iml"/>
<module fileurl="file://$PROJECT_DIR$/.idea_modules/test.iml" filepath="$PROJECT_DIR$/.idea_modules/test.iml"/>
</modules>
</component>
</project>
</project>
18 changes: 18 additions & 0 deletions scalalib/test/resources/gen-idea/idea_modules/test.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager">
<output url="file://$MODULE_DIR$/../target/workspace/mill/scalalib/GenIdeaTests/helloWorldEvaluator/test/compile/dest/classes"/>
<exclude-output/>
<content url="file://$MODULE_DIR$/../target/workspace/mill/scalalib/GenIdeaTests/helloWorldEvaluator/test/generatedSources/dest"/>
<content url="file://$MODULE_DIR$/../target/workspace/gen-idea/test">
<sourceFolder url="file://$MODULE_DIR$/../target/workspace/gen-idea/test/src" isTestSource="true"/>
<sourceFolder url="file://$MODULE_DIR$/../target/workspace/gen-idea/test/resources" isTestSource="true" type="java-resource"/>
<excludeFolder url="file://$MODULE_DIR$/../target/workspace/gen-idea/test/target"/>
</content>
<orderEntry type="inheritedJdk"/>
<orderEntry type="sourceFolder" forTests="false"/>
<orderEntry type="library" name="scala-sdk-2.12.4" level="application"/>
<orderEntry type="library" name="scala-library-2.12.4-sources.jar" level="project"/>
<orderEntry type="library" name="scala-library-2.12.4.jar" level="project"/>
<orderEntry type="module" module-name="" exported=""/>
</component>
</module>
5 changes: 5 additions & 0 deletions scalalib/test/src/mill/scalalib/GenIdeaTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ object GenIdeaTests extends TestSuite {
trait HelloWorldModule extends scalalib.ScalaModule {
def scalaVersion = "2.12.4"
def millSourcePath = GenIdeaTests.millSourcePath
object test extends super.Tests {
def testFrameworks = Seq("utest.runner.Framework")
}
}

object HelloWorld extends TestUtil.BaseModule with HelloWorldModule
Expand All @@ -34,6 +37,8 @@ object GenIdeaTests extends TestSuite {
Seq(
"gen-idea/idea_modules/iml" ->
millSourcePath / "generated" / ".idea_modules" /".iml",
"gen-idea/idea_modules/test.iml" ->
millSourcePath / "generated" / ".idea_modules" /"test.iml",
"gen-idea/idea_modules/mill-build.iml" ->
millSourcePath / "generated" / ".idea_modules" /"mill-build.iml",
"gen-idea/idea/libraries/scala-library-2.12.4.jar.xml" ->
Expand Down

0 comments on commit a145abc

Please sign in to comment.