Skip to content

Commit

Permalink
fixed test outOfMemoryException
Browse files Browse the repository at this point in the history
  • Loading branch information
elect86 committed Nov 6, 2020
1 parent 6dbac90 commit 347ec4e
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 37 deletions.
13 changes: 8 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ dependencies {
testImplementation("io.kotest:kotest-assertions-core-jvm:$kotestVersion")
}

java { modularity.inferModulePath.set(true) }
//java { modularity.inferModulePath.set(true) }

tasks {
dokkaHtml {
Expand All @@ -83,11 +83,14 @@ tasks {
sourceCompatibility = "11"
}

compileJava { // this is needed because we have a separate compile step in this example with the 'module-info.java' is in 'main/java' and the Kotlin code is in 'main/kotlin'
options.compilerArgs = listOf("--patch-module", "$moduleName=${sourceSets.main.get().output.asPath}")
}
// compileJava { // this is needed because we have a separate compile step in this example with the 'module-info.java' is in 'main/java' and the Kotlin code is in 'main/kotlin'
// options.compilerArgs = listOf("--patch-module", "$moduleName=${sourceSets.main.get().output.asPath}")
// }

withType<Test> { useJUnitPlatform() }
withType<Test> {
useJUnitPlatform()
maxHeapSize = "1g" // set heap size for the test JVM(s)
}
}

val dokkaJavadocJar by tasks.register<Jar>("dokkaJavadocJar") {
Expand Down
60 changes: 30 additions & 30 deletions src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
module com.github.kotlin_graphics.assimp {

requires kotlin.stdlib;

requires java.xml;

requires com.github.kotlin_graphics.uno_core;
requires com.github.kotlin_graphics.gli;
requires com.github.kotlin_graphics.glm;
requires com.github.kotlin_graphics.kotlin_unsigned;
requires com.github.kotlin_graphics.kool;

requires kotlin.logging.jvm;

exports assimp;
exports assimp.format;
exports assimp.format.assbin;
exports assimp.format.assxml;
exports assimp.format.blender;
exports assimp.format.collada;
exports assimp.format.fbx;
exports assimp.format.md2;
exports assimp.format.md3;
exports assimp.format.md5;
exports assimp.format.obj;
exports assimp.format.ply;
exports assimp.format.stl;
exports assimp.format.X;
exports assimp.postProcess;
}
//module com.github.kotlin_graphics.assimp {
//
// requires kotlin.stdlib;
//
// requires java.xml;
//
// requires com.github.kotlin_graphics.uno_core;
// requires com.github.kotlin_graphics.gli;
// requires com.github.kotlin_graphics.glm;
// requires com.github.kotlin_graphics.kotlin_unsigned;
// requires com.github.kotlin_graphics.kool;
//
// requires kotlin.logging.jvm;
//
// exports assimp;
// exports assimp.format;
// exports assimp.format.assbin;
// exports assimp.format.assxml;
// exports assimp.format.blender;
// exports assimp.format.collada;
// exports assimp.format.fbx;
// exports assimp.format.md2;
// exports assimp.format.md3;
// exports assimp.format.md5;
// exports assimp.format.obj;
// exports assimp.format.ply;
// exports assimp.format.stl;
// exports assimp.format.X;
// exports assimp.postProcess;
//}
3 changes: 1 addition & 2 deletions src/test/kotlin/assimp/obj/obj.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ class obj : StringSpec() {
"box"{ box("$path/box.obj") }
"cube"{ cube("$path/cube.obj") }
"nanosuit" { nanosuit("$path/nanosuit") }
// fires "java.lang.OutOfMemoryError: Java heap space" if run together with the others
// "wall"{ wall("$path/wall.obj") }
"wall"{ wall("$path/wall.obj") }
"spider"{ spider.obj("$path/spider") }
"shelter" { shelter("$path/shelter") }
"car" { car("$path/car") }
Expand Down

0 comments on commit 347ec4e

Please sign in to comment.