diff --git a/include/seqan3/alignment/configuration/align_config_method.hpp b/include/seqan3/alignment/configuration/align_config_method.hpp index 3bfc6926c4..6941a04096 100644 --- a/include/seqan3/alignment/configuration/align_config_method.hpp +++ b/include/seqan3/alignment/configuration/align_config_method.hpp @@ -132,14 +132,14 @@ struct method_global : public pipeable_config_element {} //!\} - //!\brief If set to `true`, leading gaps in sequence1 are not penalized when computing the optimal alignment. - seqan3::align_cfg::free_end_gaps_sequence1_leading free_end_gaps_sequence1_leading{false}; - //!\brief If set to `true`, leading gaps in sequence2 are not penalized when computing the optimal alignment. - seqan3::align_cfg::free_end_gaps_sequence2_leading free_end_gaps_sequence2_leading{false}; - //!\brief If set to `true`, trailing gaps in sequence1 are not penalized when computing the optimal alignment. - seqan3::align_cfg::free_end_gaps_sequence1_trailing free_end_gaps_sequence1_trailing{false}; - //!\brief If set to `true`, trailing gaps in sequence2 are not penalized when computing the optimal alignment. - seqan3::align_cfg::free_end_gaps_sequence2_trailing free_end_gaps_sequence2_trailing{false}; + //!\brief If set to `true`, leading gaps in sequence1 are not penalised when computing the optimal alignment. + bool free_end_gaps_sequence1_leading{false}; + //!\brief If set to `true`, leading gaps in sequence2 are not penalised when computing the optimal alignment. + bool free_end_gaps_sequence2_leading{false}; + //!\brief If set to `true`, trailing gaps in sequence1 are not penalised when computing the optimal alignment. + bool free_end_gaps_sequence1_trailing{false}; + //!\brief If set to `true`, trailing gaps in sequence2 are not penalised when computing the optimal alignment. + bool free_end_gaps_sequence2_trailing{false}; //!\privatesection //!\brief An internal id used to check for a valid alignment configuration. diff --git a/test/unit/alignment/configuration/align_config_method_test.cpp b/test/unit/alignment/configuration/align_config_method_test.cpp index 793a508869..01611ede25 100644 --- a/test/unit/alignment/configuration/align_config_method_test.cpp +++ b/test/unit/alignment/configuration/align_config_method_test.cpp @@ -28,18 +28,18 @@ TEST(method_global, access_member_variables) seqan3::align_cfg::method_global opt{}; // default construction // all default to false - EXPECT_FALSE(opt.free_end_gaps_sequence1_leading.get()); - EXPECT_FALSE(opt.free_end_gaps_sequence2_leading.get()); - EXPECT_FALSE(opt.free_end_gaps_sequence1_trailing.get()); - EXPECT_FALSE(opt.free_end_gaps_sequence2_trailing.get()); - - opt.free_end_gaps_sequence1_leading = seqan3::align_cfg::free_end_gaps_sequence1_leading{true}; - opt.free_end_gaps_sequence2_leading = seqan3::align_cfg::free_end_gaps_sequence2_leading{true}; - opt.free_end_gaps_sequence1_trailing = seqan3::align_cfg::free_end_gaps_sequence1_trailing{true}; - opt.free_end_gaps_sequence2_trailing = seqan3::align_cfg::free_end_gaps_sequence2_trailing{true}; - - EXPECT_TRUE(opt.free_end_gaps_sequence1_leading.get()); - EXPECT_TRUE(opt.free_end_gaps_sequence2_leading.get()); - EXPECT_TRUE(opt.free_end_gaps_sequence1_trailing.get()); - EXPECT_TRUE(opt.free_end_gaps_sequence2_trailing.get()); + EXPECT_FALSE(opt.free_end_gaps_sequence1_leading); + EXPECT_FALSE(opt.free_end_gaps_sequence2_leading); + EXPECT_FALSE(opt.free_end_gaps_sequence1_trailing); + EXPECT_FALSE(opt.free_end_gaps_sequence2_trailing); + + opt.free_end_gaps_sequence1_leading = true; + opt.free_end_gaps_sequence2_leading = true; + opt.free_end_gaps_sequence1_trailing = true; + opt.free_end_gaps_sequence2_trailing = true; + + EXPECT_TRUE(opt.free_end_gaps_sequence1_leading); + EXPECT_TRUE(opt.free_end_gaps_sequence2_leading); + EXPECT_TRUE(opt.free_end_gaps_sequence1_trailing); + EXPECT_TRUE(opt.free_end_gaps_sequence2_trailing); }