Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests for warnings in the body section #121

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

srbcheema1
Copy link
Contributor

This PR aims to solve issue #92 partially.
Added tests for position, id, reference alternate matching and info imprecise.


SECTION("Reference and alternate alleles share first nucleotide")
{
vcf::Record record1(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use { } for constructors. using ( ) is somewhat deprecated unless necessary.

{ },
{ },
source);
record1.types = { vcf::RecordType::INDEL };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line is not necessary, the constructor takes care

{ },
{ },
source);
record2.types = { vcf::RecordType::MNV };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you want it to be a MNV, remove this line and change the ref and alt alleles to GT and AC respectively, look at Record::set_types

{ },
{ },
source);
record3.types = { vcf::RecordType::INDEL };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again, not needed.

@srbcheema1
Copy link
Contributor Author

Thank you for suggesting the changes. I have added them in next commit. Can you please take a look?

}
}

TEST_CASE("Record Reference Alternate matching warnings", "[body reference alternate matching warnings]")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tags are a way to group tests, so it's not really useful to have so many specific tags.
https://github.com/catchorg/Catch2/blob/master/docs/test-cases-and-sections.md#tags
I would keep just [warnings] for these tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed :)

@cyenyxe cyenyxe changed the base branch from develop to master April 3, 2019 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants