Skip to content

Commit

Permalink
chore: increase test coverage further
Browse files Browse the repository at this point in the history
  • Loading branch information
clintval committed Jul 28, 2024
1 parent 7b3ccbe commit 667578f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,12 @@ object Disambiguate {
IOUtil.setCompressionLevel(conf.compression())
Io.compressionLevel = conf.compression()

// $COVERAGE-OFF$
if (IntelCompressionLibrarySupported) {
BlockCompressedOutputStream.setDefaultDeflaterFactory(new IntelDeflaterFactory)
BlockGunzipper.setDefaultInflaterFactory(new IntelInflaterFactory)
}
// $COVERAGE-ON$

Io.tmpDir = conf.tmpDir()
System.setProperty("java.io.tmpdir", conf.tmpDir().toAbsolutePath.toString)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ object TemplateOrdering extends FgBioEnum[TemplateOrdering] {
* If neither template is clearly better, then the templates are equivalent.
*/
case object ClassicOrdering extends TemplateOrdering {
// $COVERAGE-OFF$
private def bestAlignmentScore(template: Template): MetricPair[Int] = MetricPair[Int](template, AS)(_ max _)
private def worstAlignmentScore(template: Template): MetricPair[Int] = MetricPair[Int](template, AS)(_ min _)
private def bestNumMismatches(template: Template): MetricPair[Int] = MetricPair[Int](template, NM)(_ min _)
private def worstNumMismatches(template: Template): MetricPair[Int] = MetricPair[Int](template, NM)(_ max _)
// $COVERAGE-ON$

/** Compare two templates using the original published algorithm. */
override def compare(x: Template, y: Template): Int = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ object Bams {

/** Advance to the next sequence of templates. */
override def next(): Seq[Template] = {
require(hasNext, "next() called on empty iterator")
val templates = iterators.map(_.next())
require(
templates.map(_.name).distinct.length <= 1,
Expand Down

0 comments on commit 667578f

Please sign in to comment.