From 0ffaa02cde2dafc772b601e216462752cd67bcaf Mon Sep 17 00:00:00 2001 From: Lydia Buntrock Date: Tue, 31 Mar 2020 11:12:23 +0200 Subject: [PATCH] [MISC] style guide fixes Signed-off-by: Lydia Buntrock --- test/unit/alphabet/adaptation/char_test.cpp | 18 +-- test/unit/alphabet/adaptation/uint_test.cpp | 14 +- test/unit/alphabet/aminoacid/aa20_test.cpp | 2 +- .../composite/composite_integration_test.cpp | 127 +++++++++--------- 4 files changed, 80 insertions(+), 81 deletions(-) diff --git a/test/unit/alphabet/adaptation/char_test.cpp b/test/unit/alphabet/adaptation/char_test.cpp index b3f496281e..0889d3b793 100644 --- a/test/unit/alphabet/adaptation/char_test.cpp +++ b/test/unit/alphabet/adaptation/char_test.cpp @@ -37,8 +37,8 @@ TYPED_TEST(char_adaptation, type_properties) TYPED_TEST(char_adaptation, alphabet_char_t) { - EXPECT_TRUE((std::is_same_v, TypeParam>)); - EXPECT_TRUE((std::is_same_v, TypeParam>)); + EXPECT_TRUE((std::is_same_v, TypeParam>)); + EXPECT_TRUE((std::is_same_v, TypeParam>)); EXPECT_TRUE((std::is_same_v, TypeParam>)); } @@ -55,23 +55,23 @@ TYPED_TEST(char_adaptation, to_char) TYPED_TEST(char_adaptation, assign_char_to) { TypeParam l{'A'}; - EXPECT_TRUE((std::is_same_v &>)); EXPECT_TRUE((std::is_same_v >)); + seqan3::alphabet_char_t>)); EXPECT_EQ((seqan3::assign_char_to('A', TypeParam{'C'})), l); - EXPECT_EQ((seqan3::assign_char_to('C', l )), TypeParam{'C'}); + EXPECT_EQ((seqan3::assign_char_to('C', l)), TypeParam{'C'}); } TYPED_TEST(char_adaptation, assign_char_strictly_to) { TypeParam l{'A'}; - EXPECT_TRUE((std::is_same_v &>)); EXPECT_TRUE((std::is_same_v >)); + seqan3::alphabet_char_t>)); EXPECT_EQ((seqan3::assign_char_strictly_to('A', TypeParam{'C'})), l); - EXPECT_EQ((seqan3::assign_char_strictly_to('C', l )), TypeParam{'C'}); + EXPECT_EQ((seqan3::assign_char_strictly_to('C', l)), TypeParam{'C'}); } TYPED_TEST(char_adaptation, alphabet_rank_t) @@ -99,7 +99,7 @@ TYPED_TEST(char_adaptation, assign_rank_to) EXPECT_TRUE((std::is_same_v &>)); EXPECT_TRUE((std::is_same_v >)); + seqan3::alphabet_char_t>)); EXPECT_EQ((seqan3::assign_rank_to(65, TypeParam{'C'})), l); EXPECT_EQ((seqan3::assign_rank_to(67, l)), TypeParam{'C'}); } diff --git a/test/unit/alphabet/adaptation/uint_test.cpp b/test/unit/alphabet/adaptation/uint_test.cpp index ee2be42f0d..769b15a207 100644 --- a/test/unit/alphabet/adaptation/uint_test.cpp +++ b/test/unit/alphabet/adaptation/uint_test.cpp @@ -40,8 +40,8 @@ TYPED_TEST(uint_adaptation, type_properties) TYPED_TEST(uint_adaptation, alphabet_rank_t) { - EXPECT_TRUE((std::is_same_v, TypeParam>)); - EXPECT_TRUE((std::is_same_v, TypeParam>)); + EXPECT_TRUE((std::is_same_v, TypeParam>)); + EXPECT_TRUE((std::is_same_v, TypeParam>)); EXPECT_TRUE((std::is_same_v, TypeParam>)); } @@ -61,7 +61,7 @@ TYPED_TEST(uint_adaptation, assign_rank) EXPECT_TRUE((std::is_same_v &>)); EXPECT_TRUE((std::is_same_v >)); + seqan3::alphabet_rank_t>)); EXPECT_EQ((seqan3::assign_rank_to(65, TypeParam{65})), l); EXPECT_EQ((seqan3::assign_rank_to(67, l)), TypeParam{67}); } @@ -96,7 +96,7 @@ TYPED_TEST(uint_adaptation, assign_char) EXPECT_TRUE((std::is_same_v &>)); EXPECT_TRUE((std::is_same_v >)); + seqan3::alphabet_rank_t>)); EXPECT_EQ((seqan3::assign_char_to('A', TypeParam{67})), l); EXPECT_EQ((seqan3::assign_char_to('C', l)), TypeParam{67}); } @@ -104,12 +104,12 @@ TYPED_TEST(uint_adaptation, assign_char) TYPED_TEST(uint_adaptation, assign_char_strictly_to) { TypeParam l{65}; - EXPECT_TRUE((std::is_same_v &>)); EXPECT_TRUE((std::is_same_v >)); + seqan3::alphabet_rank_t>)); EXPECT_EQ((seqan3::assign_char_strictly_to('A', TypeParam{67})), l); - EXPECT_EQ((seqan3::assign_char_strictly_to('C', l )), TypeParam{67}); + EXPECT_EQ((seqan3::assign_char_strictly_to('C', l)), TypeParam{67}); } TYPED_TEST(uint_adaptation, alphabet_size) diff --git a/test/unit/alphabet/aminoacid/aa20_test.cpp b/test/unit/alphabet/aminoacid/aa20_test.cpp index 605f4fbd2b..77f7f98674 100644 --- a/test/unit/alphabet/aminoacid/aa20_test.cpp +++ b/test/unit/alphabet/aminoacid/aa20_test.cpp @@ -52,7 +52,7 @@ TEST(aa20, assign_char) EXPECT_EQ((seqan3::assign_char_to(chr, seqan3::aa20{})), alp); } -TEST(aa20,to_char) +TEST(aa20, to_char) { std::vector chars { diff --git a/test/unit/alphabet/composite/composite_integration_test.cpp b/test/unit/alphabet/composite/composite_integration_test.cpp index 957097c77b..e8a7202a6c 100644 --- a/test/unit/alphabet/composite/composite_integration_test.cpp +++ b/test/unit/alphabet/composite/composite_integration_test.cpp @@ -281,12 +281,12 @@ TEST(composite, custom_comparison) EXPECT_LT(t11, 'G'_rna4); EXPECT_LT(t11, seqan3::phred42{4}); - EXPECT_EQ('C'_dna4, t11); - EXPECT_EQ('C'_rna4, t11); - EXPECT_EQ(seqan3::phred42{3}, t11); - EXPECT_LT('A'_dna4, t11); - EXPECT_LT('A'_rna4, t11); - EXPECT_LT(seqan3::phred42{2}, t11); + EXPECT_EQ('C'_dna4, t11); + EXPECT_EQ('C'_rna4, t11); + EXPECT_EQ(seqan3::phred42{3}, t11); + EXPECT_LT('A'_dna4, t11); + EXPECT_LT('A'_rna4, t11); + EXPECT_LT(seqan3::phred42{2}, t11); seqan3::qualified t21{'K'_aa27, seqan3::phred63{3}}; EXPECT_EQ(t21, 'K'_aa27); @@ -294,10 +294,10 @@ TEST(composite, custom_comparison) EXPECT_LT(t21, 'L'_aa27); EXPECT_LT(t21, seqan3::phred63{4}); - EXPECT_EQ('K'_aa27, t21); - EXPECT_EQ(seqan3::phred63{3}, t21); - EXPECT_LT('C'_aa27, t21); - EXPECT_LT(seqan3::phred63{2}, t21); + EXPECT_EQ('K'_aa27, t21); + EXPECT_EQ(seqan3::phred63{3}, t21); + EXPECT_LT('C'_aa27, t21); + EXPECT_LT(seqan3::phred63{2}, t21); qualified_gapped_dna_phred42 t31{'C'_dna4, seqan3::phred42{3}}; EXPECT_EQ(t31, 'C'_dna4); @@ -305,22 +305,22 @@ TEST(composite, custom_comparison) EXPECT_EQ(t31, seqan3::phred42{3}); EXPECT_NE(t31, seqan3::gap{}); EXPECT_EQ(t31, seqan3::gapped('C'_dna4)); - EXPECT_LT(t31, 'G'_dna4); // * - EXPECT_LT(t31, 'G'_rna4); // * + EXPECT_LT(t31, 'G'_dna4); // * + EXPECT_LT(t31, 'G'_rna4); // * EXPECT_LT(t31, seqan3::phred42{4}); - EXPECT_LT(t31, seqan3::gap{}); // * + EXPECT_LT(t31, seqan3::gap{}); // * EXPECT_LT(t31, seqan3::gapped('G'_dna4)); - EXPECT_EQ('C'_dna4, t31); - EXPECT_EQ('C'_rna4, t31); - EXPECT_EQ(seqan3::phred42{3}, t31); - EXPECT_NE(seqan3::gap{}, t31); - EXPECT_EQ(seqan3::gapped('C'_dna4), t31); - EXPECT_LT('A'_dna4, t31); // * - EXPECT_LT('A'_rna4, t31); // * - EXPECT_LT(seqan3::phred42{2}, t31); - EXPECT_GT(seqan3::gap{}, t31); // * - EXPECT_LT(seqan3::gapped('A'_dna4), t31); + EXPECT_EQ('C'_dna4, t31); + EXPECT_EQ('C'_rna4, t31); + EXPECT_EQ(seqan3::phred42{3}, t31); + EXPECT_NE(seqan3::gap{}, t31); + EXPECT_EQ(seqan3::gapped('C'_dna4), t31); + EXPECT_LT('A'_dna4, t31); // * + EXPECT_LT('A'_rna4, t31); // * + EXPECT_LT(seqan3::phred42{2}, t31); + EXPECT_GT(seqan3::gap{}, t31); // * + EXPECT_LT(seqan3::gapped('A'_dna4), t31); gapped_qualified_dna_phred42 t41{qualified_dna_phred42{'C'_dna4, seqan3::phred42{3}}}; EXPECT_EQ(t41, 'C'_dna4); @@ -329,23 +329,23 @@ TEST(composite, custom_comparison) EXPECT_NE(t41, seqan3::gap{}); EXPECT_EQ(t41, (qualified_dna_phred42{'C'_dna4, seqan3::phred42{3}})); EXPECT_EQ(t41, (gapped_qualified_dna_phred42{qualified_dna_phred42{'C'_dna4, seqan3::phred42{3}}})); -// EXPECT_LT(t41, 'G'_dna4); // not supposed to work -// EXPECT_LT(t41, 'G'_rna4); // not supposed to work +// EXPECT_LT(t41, 'G'_dna4); // not supposed to work +// EXPECT_LT(t41, 'G'_rna4); // not supposed to work // EXPECT_LT(t41, seqan3::phred42{4}); // would never be LT, because seqan3::dna4 part of tuple defaulted to 'A' on RHS - EXPECT_LT(t41, seqan3::gap{}); // * - EXPECT_LT(t41, (qualified_dna_phred42{'G'_dna4, seqan3::phred42{2}})); // * + EXPECT_LT(t41, seqan3::gap{}); // * + EXPECT_LT(t41, (qualified_dna_phred42{'G'_dna4, seqan3::phred42{2}})); // * EXPECT_LT(t41, (gapped_qualified_dna_phred42{qualified_dna_phred42{'G'_dna4, seqan3::phred42{2}}})); - EXPECT_EQ('C'_dna4, t41); - EXPECT_EQ('C'_rna4, t41); - EXPECT_EQ(seqan3::phred42{3}, t41); + EXPECT_EQ('C'_dna4, t41); + EXPECT_EQ('C'_rna4, t41); + EXPECT_EQ(seqan3::phred42{3}, t41); EXPECT_EQ((qualified_dna_phred42{'C'_dna4, seqan3::phred42{3}}), t41); - EXPECT_NE(seqan3::gap{}, t41); -// EXPECT_LT('A'_dna4, t41); // not supposed to work -// EXPECT_LT('A'_rna4, t41); // not supposed to work -// EXPECT_LT(seqan3::phred42{2}, t41); // not supposed to work - EXPECT_LT((qualified_dna_phred42{'A'_dna4, seqan3::phred42{2}}), t41); // * - EXPECT_GT(seqan3::gap{}, t41); // * + EXPECT_NE(seqan3::gap{}, t41); +// EXPECT_LT('A'_dna4, t41); // not supposed to work +// EXPECT_LT('A'_rna4, t41); // not supposed to work +// EXPECT_LT(seqan3::phred42{2}, t41); // not supposed to work + EXPECT_LT((qualified_dna_phred42{'A'_dna4, seqan3::phred42{2}}), t41); // * + EXPECT_GT(seqan3::gap{}, t41); // * qualified_qualified_gapped_dna_phred42_phred42 t51{qualified_gapped_dna_phred42{'C'_dna4, seqan3::phred42{3}}}; EXPECT_EQ(t51, 'C'_dna4); @@ -354,24 +354,24 @@ TEST(composite, custom_comparison) EXPECT_EQ(t51, seqan3::gapped('C'_dna4)); EXPECT_EQ(t51, seqan3::phred42{0}); // "outer" phred element EXPECT_EQ(t51, (qualified_gapped_dna_phred42{'C'_dna4, seqan3::phred42{3}})); -// EXPECT_LT(t51, 'G'_dna4); // not supposed to work -// EXPECT_LT(t51, 'G'_rna4); // not supposed to work -// EXPECT_LT(t51, seqan3::gap{}); // not supposed to work -// EXPECT_LT(t51, seqan3::gapped('G'_dna4)); // not supposed to work +// EXPECT_LT(t51, 'G'_dna4); // not supposed to work +// EXPECT_LT(t51, 'G'_rna4); // not supposed to work +// EXPECT_LT(t51, seqan3::gap{}); // not supposed to work +// EXPECT_LT(t51, seqan3::gapped('G'_dna4)); // not supposed to work EXPECT_LT(t51, seqan3::phred42{1}); EXPECT_LT(t51, (qualified_gapped_dna_phred42{'C'_dna4, seqan3::phred42{4}})); - EXPECT_EQ('C'_dna4, t51); - EXPECT_EQ('C'_rna4, t51); - EXPECT_NE(seqan3::gap{}, t51); - EXPECT_EQ(seqan3::gapped('C'_dna4), t51); - EXPECT_EQ(seqan3::phred42{0}, t51); + EXPECT_EQ('C'_dna4, t51); + EXPECT_EQ('C'_rna4, t51); + EXPECT_NE(seqan3::gap{}, t51); + EXPECT_EQ(seqan3::gapped('C'_dna4), t51); + EXPECT_EQ(seqan3::phred42{0}, t51); EXPECT_EQ((qualified_gapped_dna_phred42{'C'_dna4, seqan3::phred42{3}}), t51); -// EXPECT_LT('A'_dna4, t51); // not supposed to work -// EXPECT_LT('A'_rna4, t51); // not supposed to work -// EXPECT_GT(seqan3::gap{}, t51); // not supposed to work -// EXPECT_LT(seqan3::gapped('A'_dna4), t51); // not supposed to work - EXPECT_GT(seqan3::phred42{1}, t51); +// EXPECT_LT('A'_dna4, t51); // not supposed to work +// EXPECT_LT('A'_rna4, t51); // not supposed to work +// EXPECT_GT(seqan3::gap{}, t51); // not supposed to work +// EXPECT_LT(seqan3::gapped('A'_dna4), t51); // not supposed to work + EXPECT_GT(seqan3::phred42{1}, t51); EXPECT_GT((qualified_gapped_dna_phred42{'C'_dna4, seqan3::phred42{4}}), t51); gapped_alphabet_variant_dna_phred42 t61{'C'_rna4}; @@ -379,22 +379,21 @@ TEST(composite, custom_comparison) EXPECT_EQ(t61, 'C'_dna4); EXPECT_NE(t61, seqan3::gap{}); EXPECT_NE(t61, seqan3::phred42{0}); - EXPECT_LT(t61, 'G'_rna4); // * - EXPECT_LT(t61, 'G'_dna4); // * - EXPECT_LT(t61, seqan3::gap{}); // * - EXPECT_LT(t61, seqan3::phred42{1}); // * - - EXPECT_EQ('C'_rna4, t61); - EXPECT_EQ('C'_dna4, t61); - EXPECT_NE(seqan3::gap{}, t61); - EXPECT_NE(seqan3::phred42{0}, t61); - EXPECT_LT('A'_rna4, t61); // * - EXPECT_LT('A'_dna4, t61); // * - EXPECT_GT(seqan3::gap{}, t61); // * - EXPECT_GT(seqan3::phred42{0}, t61); // * + EXPECT_LT(t61, 'G'_rna4); // * + EXPECT_LT(t61, 'G'_dna4); // * + EXPECT_LT(t61, seqan3::gap{}); // * + EXPECT_LT(t61, seqan3::phred42{1}); // * + + EXPECT_EQ('C'_rna4, t61); + EXPECT_EQ('C'_dna4, t61); + EXPECT_NE(seqan3::gap{}, t61); + EXPECT_NE(seqan3::phred42{0}, t61); + EXPECT_LT('A'_rna4, t61); // * + EXPECT_LT('A'_dna4, t61); // * + EXPECT_GT(seqan3::gap{}, t61); // * + EXPECT_GT(seqan3::phred42{0}, t61); // * } - TEST(composite, get_) { using seqan3::get;