Skip to content

Commit

Permalink
Remove trailing whitespace, fixed intendation and fix tests
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 ee956f7 commit 4a5c3b0
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 40 deletions.
2 changes: 1 addition & 1 deletion src/vcf/validate_optional_policy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ namespace ebi
util::string_split(it->second, ",", values);
if (values.size() != record.alternate_alleles.size()) {
throw new InfoBodyError{state.n_lines,
"INFO SVLEN should have same number of values as ALT ", "Expected " + std::to_string(record.alternate_alleles.size())
"INFO SVLEN should have same number of values as ALT", "Expected " + std::to_string(record.alternate_alleles.size())
+ ", found " + std::to_string(values.size())};
}
}
Expand Down
78 changes: 39 additions & 39 deletions test/vcf/optional_policy_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,47 +138,47 @@ namespace ebi

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
});
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_NOTHROW( (optional_policy.optional_check_body_entry(parsing_state, vcf::Record{
1,
"chr1",
123456,
{ "id123" },
"A",
{ "AC", "ACT" },
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*);
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*);
}
}

Expand Down

0 comments on commit 4a5c3b0

Please sign in to comment.