-
-
Notifications
You must be signed in to change notification settings - Fork 540
/
canonical-data.json
196 lines (196 loc) · 5.44 KB
/
canonical-data.json
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
{
"exercise": "hamming",
"comments": [
"Language implementations vary on the issue of unequal length strands.",
"A language may elect to simplify this task by only presenting equal",
"length test cases. For languages handling unequal length strands as",
"error condition, unequal length test cases are included here and are",
"indicated with an error object. Language idioms of errors or exceptions",
"should be followed. Alternative interpretations such as ignoring excess",
"length at the end are not represented here."
],
"cases": [
{
"uuid": "f6dcb64f-03b0-4b60-81b1-3c9dbf47e887",
"description": "empty strands",
"property": "distance",
"input": {
"strand1": "",
"strand2": ""
},
"expected": 0
},
{
"uuid": "54681314-eee2-439a-9db0-b0636c656156",
"description": "single letter identical strands",
"property": "distance",
"input": {
"strand1": "A",
"strand2": "A"
},
"expected": 0
},
{
"uuid": "294479a3-a4c8-478f-8d63-6209815a827b",
"description": "single letter different strands",
"property": "distance",
"input": {
"strand1": "G",
"strand2": "T"
},
"expected": 1
},
{
"uuid": "9aed5f34-5693-4344-9b31-40c692fb5592",
"description": "long identical strands",
"property": "distance",
"input": {
"strand1": "GGACTGAAATCTG",
"strand2": "GGACTGAAATCTG"
},
"expected": 0
},
{
"uuid": "cd2273a5-c576-46c8-a52b-dee251c3e6e5",
"description": "long different strands",
"property": "distance",
"input": {
"strand1": "GGACGGATTCTG",
"strand2": "AGGACGGATTCT"
},
"expected": 9
},
{
"uuid": "919f8ef0-b767-4d1b-8516-6379d07fcb28",
"description": "disallow first strand longer",
"property": "distance",
"input": {
"strand1": "AATG",
"strand2": "AAA"
},
"expected": {
"error": "left and right strands must be of equal length"
}
},
{
"uuid": "b9228bb1-465f-4141-b40f-1f99812de5a8",
"reimplements": "919f8ef0-b767-4d1b-8516-6379d07fcb28",
"description": "disallow first strand longer",
"comments": ["Normalises error messages"],
"property": "distance",
"input": {
"strand1": "AATG",
"strand2": "AAA"
},
"expected": {
"error": "strands must be of equal length"
}
},
{
"uuid": "8a2d4ed0-ead5-4fdd-924d-27c4cf56e60e",
"description": "disallow second strand longer",
"property": "distance",
"input": {
"strand1": "ATA",
"strand2": "AGTG"
},
"expected": {
"error": "left and right strands must be of equal length"
}
},
{
"uuid": "dab38838-26bb-4fff-acbe-3b0a9bfeba2d",
"reimplements": "8a2d4ed0-ead5-4fdd-924d-27c4cf56e60e",
"description": "disallow second strand longer",
"comments": ["Normalises error messages"],
"property": "distance",
"input": {
"strand1": "ATA",
"strand2": "AGTG"
},
"expected": {
"error": "strands must be of equal length"
}
},
{
"uuid": "5dce058b-28d4-4ca7-aa64-adfe4e17784c",
"description": "disallow left empty strand",
"property": "distance",
"input": {
"strand1": "",
"strand2": "G"
},
"expected": {
"error": "left strand must not be empty"
}
},
{
"uuid": "db92e77e-7c72-499d-8fe6-9354d2bfd504",
"reimplements": "5dce058b-28d4-4ca7-aa64-adfe4e17784c",
"description": "disallow left empty strand",
"comments": ["Normalises error messages"],
"property": "distance",
"input": {
"strand1": "",
"strand2": "G"
},
"expected": {
"error": "left and right strands must be of equal length"
}
},
{
"uuid": "b764d47c-83ff-4de2-ab10-6cfe4b15c0f3",
"reimplements": "db92e77e-7c72-499d-8fe6-9354d2bfd504",
"description": "disallow empty first strand",
"comments": ["Normalises error messages"],
"property": "distance",
"input": {
"strand1": "",
"strand2": "G"
},
"expected": {
"error": "strands must be of equal length"
}
},
{
"uuid": "38826d4b-16fb-4639-ac3e-ba027dec8b5f",
"description": "disallow right empty strand",
"property": "distance",
"input": {
"strand1": "G",
"strand2": ""
},
"expected": {
"error": "right strand must not be empty"
}
},
{
"uuid": "920cd6e3-18f4-4143-b6b8-74270bb8f8a3",
"reimplements": "38826d4b-16fb-4639-ac3e-ba027dec8b5f",
"description": "disallow right empty strand",
"comments": ["Normalises error messages"],
"property": "distance",
"input": {
"strand1": "G",
"strand2": ""
},
"expected": {
"error": "left and right strands must be of equal length"
}
},
{
"uuid": "9ab9262f-3521-4191-81f5-0ed184a5aa89",
"reimplements": "920cd6e3-18f4-4143-b6b8-74270bb8f8a3",
"description": "disallow empty second strand",
"comments": ["Normalises error messages"],
"property": "distance",
"input": {
"strand1": "G",
"strand2": ""
},
"expected": {
"error": "strands must be of equal length"
}
}
]
}