Browse Source

Tests pass when garbage collection is disabled

remotes/origin/HEAD
Pjotr Prins 3 years ago
parent
commit
1804ee35a6
  1. 2
      Makefile
  2. 2
      README.md
  3. 8
      test/unittests.d

2
Makefile

@ -42,7 +42,7 @@ $(BIN): $(OBJ)
check: $(BIN)
$(info running tests...)
$(BIN)
$(BIN) "--DRT-gcopt=gc:precise disable:1 cleanup:none"
clean:
rm -vf $(OBJ)

2
README.md

@ -30,6 +30,8 @@ throughput data formats by provifing fast and easy to use native BAM
file reader and writer with ability to iterate a BAM file a read at a
time,a nucleotide at a time (pileup) or via a sliding window.
Note the current Bamreader bails out on recent versions of the LDC
compiler. See also https://github.com/biod/BioD/issues/53
## Install

8
test/unittests.d

@ -140,8 +140,8 @@ unittest {
fn = buildPath(dirName(__FILE__), "data", "corrupted_zlib_archive.bam");
import bio.core.utils.zlib;
assertThrown!ZlibException(walkLength((new BamReader(fn)).reads));
// stderr.writeln("Testing random access...");
fn = buildPath(dirName(__FILE__), "data", "bins.bam");
bf = new BamReader(fn);
@ -184,6 +184,12 @@ unittest {
compareWithNaiveApproach(i, i + 100);
}
// Time to kick in GC
import core.memory;
stderr.writeln("**** Calling GC");
GC.collect();
stderr.writeln("**** Past calling GC");
{
auto fst_offset_tiny = bf["tiny"].startVirtualOffset();
auto fst_offset_small = bf["small"].startVirtualOffset();

Loading…
Cancel
Save