Skip to content

Commit

Permalink
lint fix to use string interpolation.
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyStiles committed Sep 5, 2024
1 parent e339726 commit 5bfe7b5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion io/slow5/slow5_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func testParseReadsHelper(t *testing.T, fileTarget string, errorMessage string)
}
}
if len(targetErr) == 0 {
t.Errorf(errorMessage)
t.Errorf("Test failed: %s", errorMessage)
}
}

Expand Down
12 changes: 6 additions & 6 deletions seqhash/seqhash_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,33 +35,33 @@ func TestHash(t *testing.T) {
// Test circular double stranded hashing
seqhash, _ := Hash("TTAGCCCAT", "DNA", true, true)
if seqhash != "v1_DCD_a376845b679740014f3eb501429b45e592ecc32a6ba8ba922cbe99217f6e9287" {
t.Errorf("Circular double stranded hashing failed. Expected v1_DCD_a376845b679740014f3eb501429b45e592ecc32a6ba8ba922cbe99217f6e9287, got: " + seqhash)
t.Errorf("Circular double stranded hashing failed. Expected v1_DCD_a376845b679740014f3eb501429b45e592ecc32a6ba8ba922cbe99217f6e9287, got: %s", seqhash)
}
// Test circular single stranded hashing
seqhash, _ = Hash("TTAGCCCAT", "DNA", true, false)
if seqhash != "v1_DCS_ef79b6e62394e22a176942dfc6a5e62eeef7b5281ffcb2686ecde208ec836ba4" {
t.Errorf("Circular single stranded hashing failed. Expected v1_DCS_ef79b6e62394e22a176942dfc6a5e62eeef7b5281ffcb2686ecde208ec836ba4, got: " + seqhash)
t.Errorf("Circular single stranded hashing failed. Expected v1_DCS_ef79b6e62394e22a176942dfc6a5e62eeef7b5281ffcb2686ecde208ec836ba4, got: %s", seqhash)
}
// Test linear double stranded hashing
seqhash, _ = Hash("TTAGCCCAT", "DNA", false, true)
if seqhash != "v1_DLD_c2c9fc44df72035082a152e94b04492182331bc3be2f62729d203e072211bdbf" {
t.Errorf("Linear double stranded hashing failed. Expected v1_DLD_c2c9fc44df72035082a152e94b04492182331bc3be2f62729d203e072211bdbf, got: " + seqhash)
t.Errorf("Linear double stranded hashing failed. Expected v1_DLD_c2c9fc44df72035082a152e94b04492182331bc3be2f62729d203e072211bdbf, got: %s", seqhash)
}
// Test linear single stranded hashing
seqhash, _ = Hash("TTAGCCCAT", "DNA", false, false)
if seqhash != "v1_DLS_063ea37d1154351639f9a48546bdae62fd8a3c18f3d3d3061060c9a55352d967" {
t.Errorf("Linear single stranded hashing failed. Expected v1_DLS_063ea37d1154351639f9a48546bdae62fd8a3c18f3d3d3061060c9a55352d967, got: " + seqhash)
t.Errorf("Linear single stranded hashing failed. Expected v1_DLS_063ea37d1154351639f9a48546bdae62fd8a3c18f3d3d3061060c9a55352d967, got: %s", seqhash)
}

// Test RNA Seqhash
seqhash, _ = Hash("TTAGCCCAT", "RNA", false, false)
if seqhash != "v1_RLS_063ea37d1154351639f9a48546bdae62fd8a3c18f3d3d3061060c9a55352d967" {
t.Errorf("Linear single stranded hashing failed. Expected v1_RLS_063ea37d1154351639f9a48546bdae62fd8a3c18f3d3d3061060c9a55352d967, got: " + seqhash)
t.Errorf("Linear single stranded hashing failed. Expected v1_RLS_063ea37d1154351639f9a48546bdae62fd8a3c18f3d3d3061060c9a55352d967, got: %s", seqhash)
}
// Test Protein Seqhash
seqhash, _ = Hash("MGC*", "PROTEIN", false, false)
if seqhash != "v1_PLS_922ec11f5227ce77a42f07f565a7a1a479772b5cf3f1f6e93afc5ecbc0fd5955" {
t.Errorf("Linear single stranded hashing failed. Expected v1_PLS_922ec11f5227ce77a42f07f565a7a1a479772b5cf3f1f6e93afc5ecbc0fd5955, got: " + seqhash)
t.Errorf(`Linear single stranded hashing failed. Expected v1_PLS_922ec11f5227ce77a42f07f565a7a1a479772b5cf3f1f6e93afc5ecbc0fd5955, got: %s`, seqhash)
}
}

Expand Down

0 comments on commit 5bfe7b5

Please sign in to comment.