Skip to content

Commit

Permalink
Added test cases for svlen
Browse files Browse the repository at this point in the history
  • Loading branch information
srbcheema1 authored and Cristina Yenyxe Gonzalez Garcia committed Apr 6, 2018
1 parent 1530019 commit ee956f7
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions test/vcf/optional_policy_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,51 @@ namespace ebi
vcf::InfoBodyError*);
}
}

SECTION("SVLEN test")
{
source->meta_entries.emplace(vcf::INFO,
vcf::MetaEntry{
1,
vcf::INFO,
{
{ vcf::ID, vcf::SVLEN },
{ vcf::NUMBER, "2" },
{ vcf::TYPE, vcf::INTEGER },
{ vcf::DESCRIPTION, "Difference in length between REF and ALT alleles" }
},
source
});

CHECK_NOTHROW( (optional_policy.optional_check_body_entry(parsing_state, vcf::Record{
1,
"chr1",
123456,
{ "id123" },
"A",
{ "AC","AT" },
1.0,
{ vcf::PASS },
{ { vcf::SVLEN, "1,2" } },
{ vcf::GT },
{ "1|0" },
source})) );

CHECK_THROWS_AS( (optional_policy.optional_check_body_entry(parsing_state, vcf::Record{
1,
"chr1",
123456,
{ "id123" },
"A",
{ "AC" },
1.0,
{ vcf::PASS },
{ { vcf::SVLEN, "1,2" } },
{ vcf::GT },
{ "0|1" },
source})),
vcf::InfoBodyError*);
}
}

TEST_CASE("Alternate allele warnings", "[body alt warnings]")
Expand Down

0 comments on commit ee956f7

Please sign in to comment.