Skip to content

Commit

Permalink
fix direct leaks from BcfHeader
Browse files Browse the repository at this point in the history
  • Loading branch information
Zilong-Li committed Apr 7, 2024
1 parent d7604b4 commit cc945fc
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 93 deletions.
3 changes: 2 additions & 1 deletion test/bcf-writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ TEST_CASE("make a vcf from scratch", "[bcf-writer]")

TEST_CASE("Write BCF with custome header and variants", "[bcf-writer]")
{
BcfWriter bw("test.bcf");
BcfWriter bw("test.vcf.gz");
bw.header.addFORMAT("GT", "1", "String", "Genotype");
bw.header.addINFO("AF", "A", "Float", "Estimated allele frequency in the range (0,1)");
bw.header.addContig("chr20");
Expand All @@ -40,6 +40,7 @@ TEST_CASE("Write VCF by copying header from another VCF", "[bcf-writer]")
bw.writeHeader();
br.getNextVariant(v);
bw.writeRecord(v);
// bw.close();
}

TEST_CASE("init header twice", "[bcf-writer]")
Expand Down
Loading

0 comments on commit cc945fc

Please sign in to comment.