This repository was archived by the owner on Mar 15, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhamming.vader
More file actions
47 lines (40 loc) · 1.27 KB
/
Copy pathhamming.vader
File metadata and controls
47 lines (40 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
"
" Version: 2.2.0
"
Execute (empty strands):
let strand1 = ""
let strand2 = ""
let expected = 0
AssertEqual expected, Distance(strand1, strand2)
Execute (single letter identical strands):
let strand1 = "A"
let strand2 = "A"
let expected = 0
AssertEqual expected, Distance(strand1, strand2)
Execute (single letter different strands):
let strand1 = "G"
let strand2 = "T"
let expected = 1
AssertEqual expected, Distance(strand1, strand2)
Execute (long identical strands):
let strand1 = "GGACTGAAATCTG"
let strand2 = "GGACTGAAATCTG"
let expected = 0
AssertEqual expected, Distance(strand1, strand2)
Execute (long different strands):
let strand1 = "GGACGGATTCTG"
let strand2 = "AGGACGGATTCT"
let expected = 9
AssertEqual expected, Distance(strand1, strand2)
Execute (disallow first strand longer):
let g:strand1 = "AATG"
let g:strand2 = "AAA"
let expected = 'left and right strands must be of equal length'
AssertThrows call Distance(g:strand1, g:strand2)
AssertEqual expected, g:vader_exception
Execute (disallow second strand longer):
let g:strand1 = "ATA"
let g:strand2 = "AGTG"
let expected = 'left and right strands must be of equal length'
AssertThrows call Distance(g:strand1, g:strand2)
AssertEqual expected, g:vader_exception