From 4a5c3b0fd788e13275eb50bf1b103e7b193d53ed Mon Sep 17 00:00:00 2001 From: Sarbjit Singh Date: Tue, 6 Mar 2018 00:35:20 +0530 Subject: [PATCH] Remove trailing whitespace, fixed intendation and fix tests --- src/vcf/validate_optional_policy.cpp | 2 +- test/vcf/optional_policy_test.cpp | 78 ++++++++++++++-------------- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/src/vcf/validate_optional_policy.cpp b/src/vcf/validate_optional_policy.cpp index ab54a1f90..8406454ab 100644 --- a/src/vcf/validate_optional_policy.cpp +++ b/src/vcf/validate_optional_policy.cpp @@ -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())}; } } diff --git a/test/vcf/optional_policy_test.cpp b/test/vcf/optional_policy_test.cpp index 4a383a23e..627778682 100644 --- a/test/vcf/optional_policy_test.cpp +++ b/test/vcf/optional_policy_test.cpp @@ -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*); } }