Skip to content

Commit

Permalink
hamming: normalize error messages
Browse files Browse the repository at this point in the history
I relased that #1762 does not normalize the error messages, it just makes them the same

Additionally, took the opportunity to normalize descriptions to use first strand/second strand, rather than a mix of that and left strand/right strand
  • Loading branch information
wolf99 committed Feb 14, 2021
1 parent 28e0c84 commit e9c5bc0
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions exercises/hamming/canonical-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,18 @@
},
"expected": {"error": "left and right strands must be of equal length"}
},
{
"uuid": "b9228bb1-465f-4141-b40f-1f99812de5a8",
"description": "disallow first strand longer",
"comments": ["Normalises error messages"],
"reimplements": "919f8ef0-b767-4d1b-8516-6379d07fcb28",
"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",
Expand All @@ -80,6 +92,18 @@
},
"expected": {"error": "left and right strands must be of equal length"}
},
{
"uuid": "dab38838-26bb-4fff-acbe-3b0a9bfeba2d",
"description": "disallow second strand longer",
"comments": ["Normalises error messages"],
"reimplements": "8a2d4ed0-ead5-4fdd-924d-27c4cf56e60e",
"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",
Expand All @@ -102,6 +126,18 @@
},
"expected": {"error": "left and right strands must be of equal length"}
},
{
"uuid": "b764d47c-83ff-4de2-ab10-6cfe4b15c0f3",
"description": "disallow empty first strand",
"comments": ["Normalises error messages"],
"reimplements": "db92e77e-7c72-499d-8fe6-9354d2bfd504",
"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",
Expand All @@ -123,6 +159,18 @@
"strand2": ""
},
"expected": {"error": "left and right strands must be of equal length"}
},
{
"uuid": "9ab9262f-3521-4191-81f5-0ed184a5aa89",
"description": "disallow empty second strand",
"comments": ["Normalises error messages"],
"reimplements": "920cd6e3-18f4-4143-b6b8-74270bb8f8a3",
"property": "distance",
"input": {
"strand1": "G",
"strand2": ""
},
"expected": {"error": "strands must be of equal length"}
}
]
}

0 comments on commit e9c5bc0

Please sign in to comment.