Browse Source

make unittests compile with -property

remotes/georgeg/bam_output_redesign
lomereiter 10 years ago
parent
commit
da9824be96
  1. 4
      bio/bam/bgzf/blockrange.d
  2. 2
      bio/bam/read.d
  3. 2
      bio/bam/samfile.d
  4. 4
      bio/bam/samheader.d
  5. 2
      bio/core/utils/stream.d
  6. 2
      test/unittests.d

4
bio/bam/bgzf/blockrange.d

@ -129,7 +129,7 @@ struct BgzfRange {
*/
@property ulong start_offset() { return _start_offset; }
bool empty() {
bool empty() @property {
return _empty;
}
@ -137,7 +137,7 @@ struct BgzfRange {
loadNextBlock();
}
BgzfBlock front() {
BgzfBlock front() @property {
return _current_block;
}

2
bio/bam/read.d

@ -334,7 +334,7 @@ struct BamRead {
return res;
}
SequenceResult save() const {
@property SequenceResult save() const {
return SequenceResult(_data[_getActualPosition(_index) .. $],
_len - _index,
_useFirst4Bits(_index));

2
bio/bam/samfile.d

@ -42,7 +42,7 @@ struct SamFile {
this(string filename) {
_file = File(filename);
_filename = filename;
_seekable = lseek(_file.fileno, 0, 0) != ~0;
_seekable = lseek(_file.fileno(), 0, 0) != ~0;
_initializeStream();
}

4
bio/bam/samheader.d

@ -98,7 +98,7 @@ private {
str ~= `putinteger(stream, `~Field[0].name~`);`.dup;
}
str ~= `}`.dup;
return str.idup ~ serializeFields!(Field[1..$]);
return str.idup ~ serializeFields!(Field[1..$])();
} else {
return "";
}
@ -296,7 +296,7 @@ struct ValueRange(T) {
void popBack() { _ids = _ids[0 .. $ - 1]; }
ref T opIndex(size_t i) { return _dict[_ids[i]]; }
size_t length() @property { return _ids.length; }
ValueRange save() { return ValueRange(_dict, _ids[]); }
ValueRange save() @property { return ValueRange(_dict, _ids[]); }
}
/// Common class for storing header lines

2
bio/core/utils/stream.d

@ -20,7 +20,7 @@ final class File: std.stream.File {
override ulong seek(long offset, SeekPos rel) {
assertSeekable();
auto hFile = handle;
auto hFile = handle();
version (Windows) {
int hi = cast(int)(offset>>32);
uint low = SetFilePointer(hFile, cast(int)offset, &hi, rel);

2
test/unittests.d

@ -79,7 +79,7 @@ unittest {
assert(read.mapping_quality == 0);
reads.popFront();
reads.popFront();
assert(reads.front.cigarString == "35M");
assert(reads.front.cigarString() == "35M");
assert(toSam(reads.front, bf.reference_sequences) == "EAS51_64:3:190:727:308 99 chr1 103 99 35M = 263 195 GGTGCAGAGCCGAGTCACGGGGTTGCCAGCACAGG <<<<<<<<<<<<<<<<<<<<<<<<<<<::<<<844 MF:i:18 Aq:i:73 NM:i:0 UQ:i:0 H0:i:1 H1:i:0");
assert(bf.header.getSequenceIndex("chr1") == read.ref_id);
}

Loading…
Cancel
Save