diff options
Diffstat (limited to 'test_deliverable/testcases/test_CHARARRAY0_driver.c')
-rw-r--r-- | test_deliverable/testcases/test_CHARARRAY0_driver.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test_deliverable/testcases/test_CHARARRAY0_driver.c b/test_deliverable/testcases/test_CHARARRAY0_driver.c new file mode 100644 index 0000000..0b68aae --- /dev/null +++ b/test_deliverable/testcases/test_CHARARRAY0_driver.c @@ -0,0 +1,12 @@ +#include <string.h> + +char *chararray0(char *, char, char, char); + +int main() +{ + char array[3]; + char *test_array = "abc"; + return !( chararray0(array, 'a', 'b', 'c')[0] == test_array[0] && + chararray0(array, 'a', 'b', 'c')[1] == test_array[1] && + chararray0(array, 'a', 'b', 'c')[2] == test_array[2] ); +} |