From 465769bc3f8a217fe4857341b3cef7d949c18bab Mon Sep 17 00:00:00 2001 From: Brian Broll Date: Wed, 24 Jan 2024 13:37:34 -0600 Subject: [PATCH] Fix incorrect tests for music transposition --- exercises/transpose-music/tests.json | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/exercises/transpose-music/tests.json b/exercises/transpose-music/tests.json index 82ce4ed..fbf4c7c 100644 --- a/exercises/transpose-music/tests.json +++ b/exercises/transpose-music/tests.json @@ -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" } ]