Skip to content

Commit

Permalink
Fix incorrect tests for music transposition
Browse files Browse the repository at this point in the history
  • Loading branch information
brollb committed Jan 24, 2024
1 parent 903f7a7 commit 465769b
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions exercises/transpose-music/tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,36 @@
{
"type": "CustomBlockTest",
"spec": "transpose %'note' by %'steps' steps",
"inputs": ["54", "1"],
"output": "55",
"inputs": ["78", "1"],
"output": "79",
"name": "should return G when transposing F# by 1"
},
{
"type": "CustomBlockTest",
"spec": "transpose %'note' by %'steps' steps",
"inputs": ["54", "1"],
"output": "55",
"inputs": ["84", "-2"],
"output": "82",
"name": "should return A# when transposing C by -2"
},
{
"type": "CustomBlockTest",
"spec": "transpose %'note' by %'steps' steps",
"inputs": ["54", "1"],
"output": "55",
"inputs": ["36", "5"],
"output": "41",
"name": "should return F when transposing C by 5"
},
{
"type": "CustomBlockTest",
"spec": "transpose %'note' by %'steps' steps",
"inputs": ["54", "1"],
"output": "55",
"inputs": ["C2", "5"],
"output": "41",
"name": "should accept note names (e.g., \"C4\")"
},
{
"type": "CustomBlockTest",
"spec": "transpose %'note' by %'steps' steps",
"inputs": ["50", "0"],
"output": "50",
"name": "should return original note when transposing by 0"
}
]

0 comments on commit 465769b

Please sign in to comment.