Commit 02b8fdad authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Fix code warnings

parent d16c8ad1
...@@ -43,7 +43,7 @@ class FlexiprepTest extends TestNGSuite with Matchers { ...@@ -43,7 +43,7 @@ class FlexiprepTest extends TestNGSuite with Matchers {
} }
@DataProvider(name = "flexiprepOptions") @DataProvider(name = "flexiprepOptions")
def flexiprepOptions = { def flexiprepOptions: Array[Array[Any]] = {
val paired = Array(true, false) val paired = Array(true, false)
val skipTrims = Array(true, false) val skipTrims = Array(true, false)
val skipClips = Array(true, false) val skipClips = Array(true, false)
...@@ -66,7 +66,7 @@ class FlexiprepTest extends TestNGSuite with Matchers { ...@@ -66,7 +66,7 @@ class FlexiprepTest extends TestNGSuite with Matchers {
skipTrim: Boolean, skipTrim: Boolean,
skipClip: Boolean, skipClip: Boolean,
zipped: Boolean, zipped: Boolean,
abortOnCorruptFastq: Boolean) = { abortOnCorruptFastq: Boolean): Unit = {
val outputDir = FlexiprepTest.outputDir val outputDir = FlexiprepTest.outputDir
dirs :+= outputDir dirs :+= outputDir
val map = ConfigUtils.mergeMaps(Map("output_dir" -> outputDir, val map = ConfigUtils.mergeMaps(Map("output_dir" -> outputDir,
...@@ -76,8 +76,8 @@ class FlexiprepTest extends TestNGSuite with Matchers { ...@@ -76,8 +76,8 @@ class FlexiprepTest extends TestNGSuite with Matchers {
), Map(FlexiprepTest.executables.toSeq: _*)) ), Map(FlexiprepTest.executables.toSeq: _*))
val flexiprep: Flexiprep = initPipeline(map) val flexiprep: Flexiprep = initPipeline(map)
flexiprep.inputR1 = (if (zipped) FlexiprepTest.r1Zipped else FlexiprepTest.r1) flexiprep.inputR1 = if (zipped) FlexiprepTest.r1Zipped else FlexiprepTest.r1
if (paired) flexiprep.inputR2 = Some((if (zipped) FlexiprepTest.r2Zipped else FlexiprepTest.r2)) if (paired) flexiprep.inputR2 = Some(if (zipped) FlexiprepTest.r2Zipped else FlexiprepTest.r2)
flexiprep.sampleId = Some("1") flexiprep.sampleId = Some("1")
flexiprep.libId = Some("1") flexiprep.libId = Some("1")
flexiprep.script() flexiprep.script()
...@@ -91,7 +91,7 @@ class FlexiprepTest extends TestNGSuite with Matchers { ...@@ -91,7 +91,7 @@ class FlexiprepTest extends TestNGSuite with Matchers {
} }
@Test @Test
def testNoSample: Unit = { def testNoSample(): Unit = {
val outputDir = FlexiprepTest.outputDir val outputDir = FlexiprepTest.outputDir
dirs :+= outputDir dirs :+= outputDir
val map = ConfigUtils.mergeMaps(Map( val map = ConfigUtils.mergeMaps(Map(
...@@ -105,15 +105,15 @@ class FlexiprepTest extends TestNGSuite with Matchers { ...@@ -105,15 +105,15 @@ class FlexiprepTest extends TestNGSuite with Matchers {
} }
// remove temporary run directory all tests in the class have been run // remove temporary run directory all tests in the class have been run
@AfterClass def removeTempOutputDir() = { @AfterClass def removeTempOutputDir(): Unit = {
dirs.foreach(FileUtils.deleteDirectory) dirs.foreach(FileUtils.deleteDirectory)
} }
} }
object FlexiprepTest { object FlexiprepTest {
def outputDir = Files.createTempDir() def outputDir: File = Files.createTempDir()
val inputDir = Files.createTempDir() val inputDir: File = Files.createTempDir()
val r1 = new File(inputDir, "R1.fq") val r1 = new File(inputDir, "R1.fq")
Files.touch(r1) Files.touch(r1)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment