diff --git a/test/test_StringManipulation.c b/test/test_StringManipulation.c index 678a7d4..4c14804 100644 --- a/test/test_StringManipulation.c +++ b/test/test_StringManipulation.c @@ -4,6 +4,19 @@ #include #include "../src/stringManipulation.c" +void test_toUnsignedInteger() +{ + /*variables*/ + char *n1 = "176", *n2 = "199", *n3 = "200", *n4 = "500", *n5 = "600", *n6 = "700"; + /*assertions*/ + TEST_ASSERT_EQUAL_INT(176,toUnsignedInteger(n1)); + TEST_ASSERT_EQUAL_INT(199,toUnsignedInteger(n2)); + TEST_ASSERT_EQUAL_INT(200,toUnsignedInteger(n3)); + TEST_ASSERT_EQUAL_INT(500,toUnsignedInteger(n4)); + TEST_ASSERT_EQUAL_INT(600,toUnsignedInteger(n5)); + TEST_ASSERT_EQUAL_INT(700,toUnsignedInteger(n6)); +} + void test_everyCharacterIsDigit() { /*test block 1*/