From 66f4d9c78ce5b4ffbe59ed1c3f63b58b5bcf02cd Mon Sep 17 00:00:00 2001 From: Ryan Hartlage Date: Thu, 9 Mar 2023 19:45:49 -0500 Subject: [PATCH 1/2] Move resistor color to later in the track and bump the difficulty Addresses https://github.com/exercism/c/issues/840 --- config.json | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/config.json b/config.json index 533efc421..6518b9743 100644 --- a/config.json +++ b/config.json @@ -63,19 +63,6 @@ "math" ] }, - { - "slug": "resistor-color", - "name": "Resistor Color", - "uuid": "75653d83-1a64-472c-ac43-49e87833c7f7", - "practices": [], - "prerequisites": [], - "difficulty": 1, - "topics": [ - "arrays", - "enums", - "pointers" - ] - }, { "slug": "isogram", "name": "Isogram", @@ -220,6 +207,19 @@ "structs" ] }, + { + "slug": "resistor-color", + "name": "Resistor Color", + "uuid": "75653d83-1a64-472c-ac43-49e87833c7f7", + "practices": [], + "prerequisites": [], + "difficulty": 3, + "topics": [ + "arrays", + "enums", + "pointers" + ] + }, { "slug": "pythagorean-triplet", "name": "Pythagorean Triplet", From 47119801b27679ec99316c0cc88de9e277e1da8e Mon Sep 17 00:00:00 2001 From: Ryan Hartlage Date: Sat, 11 Mar 2023 08:39:33 -0500 Subject: [PATCH 2/2] Make the return value more clear --- exercises/practice/resistor-color/test_resistor_color.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exercises/practice/resistor-color/test_resistor_color.c b/exercises/practice/resistor-color/test_resistor_color.c index 3593f5e41..0a23134b4 100644 --- a/exercises/practice/resistor-color/test_resistor_color.c +++ b/exercises/practice/resistor-color/test_resistor_color.c @@ -33,7 +33,8 @@ static void test_colors(void) TEST_IGNORE(); const resistor_band_t expected[] = { BLACK, BROWN, RED, ORANGE, YELLOW, GREEN, BLUE, VIOLET, GREY, WHITE }; - TEST_ASSERT_EQUAL_INT_ARRAY(expected, colors(), ARRAY_LENGTH(expected)); + const resistor_band_t *actual = colors(); + TEST_ASSERT_EQUAL_INT_ARRAY(expected, actual, ARRAY_LENGTH(expected)); } int main(void)