-
Notifications
You must be signed in to change notification settings - Fork 82
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
Fix/issue_3264 #3268
Merged
Merged
Fix/issue_3264 #3268
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
db2a27f
Fixes #3267 by adding proper constraints to the char conversion table.
rrahn a71d0c9
Fixes Question regarding the usage of `seqan3::fm_index_cursor` using…
rrahn d7825e9
[MISC] automatic linting
seqan-actions 2d9809e
Adds missing copyright text in test file
rrahn 2f3a9be
Removes superfluous vector include in test file.
rrahn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
test/unit/search/fm_index_cursor/extend_bitpacked_query_sequence_test.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// SPDX-FileCopyrightText: 2006-2024 Knut Reinert & Freie Universität Berlin | ||
// SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
|
||
#include <gtest/gtest.h> | ||
|
||
#include <vector> | ||
|
||
#include <seqan3/alphabet/container/bitpacked_sequence.hpp> | ||
#include <seqan3/alphabet/nucleotide/dna4.hpp> | ||
#include <seqan3/search/fm_index/fm_index.hpp> | ||
#include <seqan3/utility/views/slice.hpp> | ||
|
||
#include "../helper.hpp" | ||
|
||
TEST(fm_index_cursor_test, extend_right_with_bitpacked_sequence) | ||
{ | ||
using namespace seqan3::literals; | ||
using result_t = std::vector<std::pair<uint64_t, uint64_t>>; | ||
|
||
seqan3::bitpacked_sequence<seqan3::dna4> seq{"ACGGTCAGGTTC"_dna4}; | ||
seqan3::fm_index index{seq}; | ||
|
||
auto bitpacked_query = seqan3::views::slice(seq, 1, 4); | ||
|
||
auto it = index.cursor(); | ||
it.extend_right(bitpacked_query); // this line caused the compile time error | ||
EXPECT_EQ(seqan3::uniquify(it.locate()), (result_t{{0, 1}})); | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I am using a
std::vector
. It might be included by thehelper.hpp
already. Not including it has the potential that if some other code is refactored this test might not compile anymore since vector is not included through some dependent includes. Adding it makes clear, that I need it in the test.But frankly, I don't care too much. What is the preferred policy here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, didn't see the
result_t
. It's fine then