Commit c8e494d2 authored by bow's avatar bow
Browse files

Update SAMRecord equality test to test as file is iterated

parent 657702dc
...@@ -225,8 +225,8 @@ class WipeReadsUnitTest extends Assertions { ...@@ -225,8 +225,8 @@ class WipeReadsUnitTest extends Assertions {
writeFilteredBAM(mockFilterOutFunc, sbam01, outBAM) writeFilteredBAM(mockFilterOutFunc, sbam01, outBAM)
val exp = new SAMFileReader(sbam03).asScala val exp = new SAMFileReader(sbam03).asScala
val obs = new SAMFileReader(outBAM).asScala val obs = new SAMFileReader(outBAM).asScala
val res = for ((e, o) <- exp.zip(obs)) yield e.getSAMString === o.getSAMString for ((e, o) <- exp.zip(obs))
assert(res.reduceLeft(_ && _)) assert(e.getSAMString === o.getSAMString)
assert(outBAM.exists) assert(outBAM.exists)
assert(outBAMIndex.exists) assert(outBAMIndex.exists)
} }
...@@ -244,8 +244,8 @@ class WipeReadsUnitTest extends Assertions { ...@@ -244,8 +244,8 @@ class WipeReadsUnitTest extends Assertions {
writeFilteredBAM(mockFilterOutFunc, sbam01, outBAM, filteredOutBAM = filteredOutBAM) writeFilteredBAM(mockFilterOutFunc, sbam01, outBAM, filteredOutBAM = filteredOutBAM)
val exp = new SAMFileReader(sbam04).asScala val exp = new SAMFileReader(sbam04).asScala
val obs = new SAMFileReader(filteredOutBAM).asScala val obs = new SAMFileReader(filteredOutBAM).asScala
val res = for ((e, o) <- exp.zip(obs)) yield e.getSAMString === o.getSAMString for ((e, o) <- exp.zip(obs))
assert(res.reduceLeft(_ && _)) assert(e.getSAMString === o.getSAMString)
assert(outBAM.exists) assert(outBAM.exists)
assert(outBAMIndex.exists) assert(outBAMIndex.exists)
assert(filteredOutBAM.exists) assert(filteredOutBAM.exists)
...@@ -261,8 +261,8 @@ class WipeReadsUnitTest extends Assertions { ...@@ -261,8 +261,8 @@ class WipeReadsUnitTest extends Assertions {
writeFilteredBAM(mockFilterOutFunc, pbam01, outBAM) writeFilteredBAM(mockFilterOutFunc, pbam01, outBAM)
val exp = new SAMFileReader(pbam03).asScala val exp = new SAMFileReader(pbam03).asScala
val obs = new SAMFileReader(outBAM).asScala val obs = new SAMFileReader(outBAM).asScala
val res = for ((e, o) <- exp.zip(obs)) yield e.getSAMString === o.getSAMString for ((e, o) <- exp.zip(obs))
assert(res.reduceLeft(_ && _)) assert(e.getSAMString === o.getSAMString)
assert(outBAM.exists) assert(outBAM.exists)
assert(outBAMIndex.exists) assert(outBAMIndex.exists)
} }
......
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