Skip to content

Commit

Permalink
Updated ref alt test cases to use constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
srbcheema1 committed Mar 18, 2018
1 parent 48707ae commit ec4493c
Showing 1 changed file with 10 additions and 19 deletions.
29 changes: 10 additions & 19 deletions test/vcf/optional_policy_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ namespace ebi

SECTION("Reference and alternate alleles share first nucleotide")
{
vcf::Record record1(
CHECK_NOTHROW( (optional_policy.optional_check_body_entry(parsing_state, vcf::Record{
1,
"chr1",
123456,
Expand All @@ -211,25 +211,23 @@ namespace ebi
{ { "XYZ", "1" } },
{ },
{ },
source);
record1.types = { vcf::RecordType::INDEL };
source})) );

vcf::Record record2(
CHECK_NOTHROW( (optional_policy.optional_check_body_entry(parsing_state, vcf::Record{
1,
"chr1",
123456,
{ vcf::MISSING_VALUE },
"A",
{ "CA" },
"GT",
{ "AC" },
1.0,
{ vcf::PASS },
{ { "XYZ", "1" } },
{ },
{ },
source);
record2.types = { vcf::RecordType::MNV };
source})) );

vcf::Record record3(
CHECK_THROWS_AS( (optional_policy.optional_check_body_entry(parsing_state, vcf::Record{
1,
"chr1",
123456,
Expand All @@ -241,15 +239,8 @@ namespace ebi
{ { "XYZ", "1" } },
{ },
{ },
source);
record3.types = { vcf::RecordType::INDEL };

CHECK_NOTHROW( (optional_policy.optional_check_body_entry(parsing_state, record1)) );

CHECK_NOTHROW( (optional_policy.optional_check_body_entry(parsing_state, record2)) );

CHECK_THROWS_AS( (optional_policy.optional_check_body_entry(parsing_state, record3)),
vcf::ReferenceAlleleBodyError*);
source})),
vcf::ReferenceAlleleBodyError*);
}
}

Expand Down Expand Up @@ -412,7 +403,7 @@ namespace ebi

SECTION("Confidence Interval Tags")
{
std::vector<std::string> confidence_interval_tags = {
std::vector<std::string> confidence_interval_tags = {
vcf::CICN,
vcf::CICNADJ,
vcf::CIEND,
Expand Down

0 comments on commit ec4493c

Please sign in to comment.