a first version of obisummary

Former-commit-id: cca1019d82a14a322f46a20890b996b5c7491d41
This commit is contained in:
2023-11-09 22:33:06 +02:00
parent a96ecb4837
commit 5ea2b8afcf
7 changed files with 378 additions and 30 deletions

View File

@ -6,6 +6,18 @@ import (
"github.com/stretchr/testify/assert"
)
// TestSubsequence tests the Subsequence function.
//
// The function tests various cases of the Subsequence method of a BioSequence object.
// It checks different scenarios of subsequence slicing, including both valid and invalid parameters.
// The function is designed for unit testing purposes and uses the Go testing package.
// It asserts that the expected subsequence is returned for each test case and checks for any errors.
// The function also verifies the correctness of the subsequence qualities, if applicable.
// The test cases cover both non-circular and circular subsequence slicing.
// It ensures that the function handles different scenarios such as when `from` is greater than `to`,
// `from` or `to` is out of bounds, and normal subsequence slicing cases.
//
// TestSubsequence does not return any value.
func TestSubsequence(t *testing.T) {
// Test case 1: Subsequence with valid parameters and non-circular
seq := NewBioSequence("ID1", []byte("ATCG"), "")