From 4c0f1379b1a9ee30f902f0e8b23dcadf8b0b9812 Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Sun, 27 Mar 2016 13:19:38 -0700 Subject: [PATCH] Add more tests from stringlib --- tests/string_strcmp.c | 13 +++++++++++++ tests/string_strcmp.deps | 1 + 2 files changed, 14 insertions(+) create mode 100644 tests/string_strcmp.c create mode 100644 tests/string_strcmp.deps diff --git a/tests/string_strcmp.c b/tests/string_strcmp.c new file mode 100644 index 0000000..055400d --- /dev/null +++ b/tests/string_strcmp.c @@ -0,0 +1,13 @@ +#include "string.h" + +int main(void) +{ + if ( strcmp(NULL, NULL) != 1 ) return 1; + if ( strcmp("Test", NULL) != 1 ) return 2; + if ( strcmp(NULL, "Test") != 1 ) return 3; + if ( strcmp("Test", "Test") != 0 ) return 4; + if ( strcmp("test", "Test") != 1 ) return 5; + if ( strcmp("Test1", "Test") != 1 ) return 6; + + return 0; +} diff --git a/tests/string_strcmp.deps b/tests/string_strcmp.deps new file mode 100644 index 0000000..ee8a39c --- /dev/null +++ b/tests/string_strcmp.deps @@ -0,0 +1 @@ +string