Browse Source

Enable unittests and comments

segfaults
Pjotr Prins 3 years ago
parent
commit
9b59462093
  1. 4
      Makefile
  2. 8
      bio/core/bgzf/block.d
  3. 2
      bio/core/bgzf/inputstream.d

4
Makefile

@ -29,7 +29,7 @@ shared: LIB = libbiod.so
lib: LIB = libbiod
# debug check: DFLAGS += -O0 -d-debug -unittest -link-debuglib
check: DFLAGS += -O0 -d-debug -link-debuglib
check: DFLAGS += -O0 -d-debug -link-debuglib -unittest
release static: DFLAGS += -O3 -release -enable-inlining -boundscheck=off
static: DFLAGS += -static -L-Bstatic
shared: DFLAGS += -shared
@ -54,7 +54,7 @@ $(BIN): $(OBJ)
$(D_COMPILER) $(DFLAGS) $(OBJ) -of=$(BIN)
check: $(BIN)
$(info running tests...)
$(info Make check running tests...)
$(BIN)
# $(BIN) "--DRT-gcopt=gc:precise disable:1 cleanup:none"

8
bio/core/bgzf/block.d

@ -125,10 +125,10 @@ class DecompressedBgzfBlock {
DecompressedBgzfBlock decompressBgzfBlock(BgzfBlock block)
{
if (block.input_size == 0) {
return new DecompressedBgzfBlock(block.start_offset,
block.start_offset + block.bsize + 1,
cast(ubyte[])[]); // EOF marker
// TODO: add check for correctness of EOF marker
return new DecompressedBgzfBlock(block.start_offset,
block.start_offset + block.bsize + 1,
cast(ubyte[])[]); // EOF marker
// TODO: add check for correctness of EOF marker
}
/*

2
bio/core/bgzf/inputstream.d

@ -461,6 +461,8 @@ class BgzfInputStream : Stream {
_pool = pool;
// _cache = cache;
// The roundbuf size (n_tasks) should be at least
// the number of threads
size_t n_tasks = max(pool.size, 1) * 2;
if (buffer_size > 0)
n_tasks = max(n_tasks, buffer_size / BGZF_MAX_BLOCK_SIZE);

Loading…
Cancel
Save