/picolibc-latest/test/ |
D | test-strncat_s.c | 55 #define TEST_RES(cond, msg, handler_res, test_id) \ macro 117 TEST_RES(res == 0, "Normal Concatenation", handler_res, test_id); in main() 118 TEST_RES(strcmp(dest, "Hello, world!") == 0, in main() 127 TEST_RES(res != 0, "Concatenation with insufficient buffer", handler_res, in main() 134 TEST_RES(res != 0, "NULL Destination Pointer", handler_res, test_id); in main() 137 TEST_RES(res != 0, "NULL Source Pointer", handler_res, test_id); in main() 144 TEST_RES(res == 0, "Concatenation of empty source string", handler_res, in main() 146 TEST_RES(strcmp(dest, "Hello") == 0, in main() 155 TEST_RES(res == 0, "Concatenation of non-empty source to empty destination", in main() 157 TEST_RES(strcmp(buf2, ", world!") == 0, in main() [all …]
|
D | test-strcat_s.c | 55 #define TEST_RES(cond, msg, handler_res, test_id) \ macro 116 TEST_RES(res == 0, "Normal Concatenation", handler_res, test_id); in main() 117 TEST_RES(strcmp(dest, "Hello, world!") == 0, in main() 125 TEST_RES(res != 0, "Concatenation with insufficient buffer", handler_res, in main() 132 TEST_RES(res != 0, "NULL Destination Pointer", handler_res, test_id); in main() 135 TEST_RES(res != 0, "NULL Source Pointer", handler_res, test_id); in main() 142 TEST_RES(res == 0, "Concatenation of empty source string", handler_res, in main() 144 TEST_RES(strcmp(dest, "Hello") == 0, in main() 153 TEST_RES(res == 0, "Concatenation of non-empty source to empty destination", in main() 155 TEST_RES(strcmp(dest2, ", World!") == 0, in main()
|
D | test-strcpy_s.c | 55 #define TEST_RES(cond, msg, handler_res, test_id) \ macro 116 TEST_RES(res == 0, "Normal Copy", handler_res, test_id); in main() 117 TEST_RES(strcmp(dest, "Hello, world!") == 0, "Normal Copy Contents", in main() 125 TEST_RES(res != 0, "Copy with insufficient buffer", handler_res, test_id); in main() 131 TEST_RES(res != 0, "NULL Destination Pointer", handler_res, test_id); in main() 134 TEST_RES(res != 0, "NULL Source Pointer", handler_res, test_id); in main() 140 TEST_RES(res == 0, "Copy of empty string", handler_res, test_id); in main() 141 TEST_RES(strcmp(dest, "") == 0, "Copy of empty string Contents", in main() 149 TEST_RES(res == 0, "Copy to empty buffer", handler_res, test_id); in main() 150 TEST_RES(strcmp(buf2, "world") == 0, "Copy to empty buffer Contents", in main()
|
D | test-strncpy_s.c | 55 #define TEST_RES(cond, msg, handler_res, test_id) \ macro 116 TEST_RES(res == 0, "Normal Copy", handler_res, test_id); in main() 117 TEST_RES(strcmp(dest, "Hello, world!") == 0, "Normal Copy Contents", in main() 125 TEST_RES(res != 0, "Copy with insufficient buffer", handler_res, test_id); in main() 131 TEST_RES(res != 0, "NULL Destination Pointer", handler_res, test_id); in main() 134 TEST_RES(res != 0, "NULL Source Pointer", handler_res, test_id); in main() 140 TEST_RES(res == 0, "Copy of empty string", handler_res, test_id); in main() 141 TEST_RES(strcmp(dest, "") == 0, "Copy of empty string Contents", in main() 148 TEST_RES(res == 0, "Copy with zero Characters", handler_res, test_id); in main() 149 TEST_RES(strcmp(dest, "") == 0, "Copy with zero Characters Contents", in main()
|
D | test-sprintf_s.c | 55 #define TEST_RES(cond, msg, handler_res, test_id) \ macro 115 TEST_RES(res == (int)strlen("Hello, world!"), "Normal formatting", in main() 117 TEST_RES(strcmp(buf, "Hello, world!") == 0, "Normal formatting Contents", in main() 125 TEST_RES(res == 0, "Formatting with buffer overflow", handler_res, test_id); in main() 132 TEST_RES(res == 0, "Formatting with Null buffer", handler_res, test_id); in main() 139 TEST_RES(res == 0, "Formatting with Null format string", handler_res, in main() 145 TEST_RES(res == 0, "Empty format string", handler_res, test_id); in main() 147 TEST_RES(strcmp(buf, "") == 0, "Empty format string Contents", handler_res, in main()
|
D | test-memmove_s.c | 55 #define TEST_RES(cond, msg, handler_res, test_id) \ macro 115 TEST_RES(res == 0, "Normal move", handler_res, test_id); in main() 116 TEST_RES(strcmp(buf, "Hello, Hello, world!") == 0, "Normal move Contents", in main() 124 TEST_RES(res != 0, "Move with insufficient destination size", handler_res, in main() 131 TEST_RES(res != 0, "Move with Null destination", handler_res, test_id); in main() 137 TEST_RES(res != 0, "Move with Null source", handler_res, test_id); in main() 144 TEST_RES(res == 0, "Move with zero length", handler_res, test_id); in main() 145 TEST_RES(buf[0] == '\0', "Move with zero length Contents", handler_res, in main()
|
D | test-memcpy_s.c | 55 #define TEST_RES(cond, msg, handler_res, test_id) \ macro 116 TEST_RES(res == 0, "Normal Copy", handler_res, test_id); in main() 117 TEST_RES(strcmp(dest, "Hello, world!") == 0, "Normal Copy Contents", in main() 125 TEST_RES(res != 0, "Copy with insufficient destination size", handler_res, in main() 132 TEST_RES(res != 0, "Copy with Null destination", handler_res, test_id); in main() 138 TEST_RES(res != 0, "Copy with Null source", handler_res, test_id); in main() 145 TEST_RES(res == 0, "Copy with zero length", handler_res, test_id); in main() 146 TEST_RES(dest[0] == '\0', "Copy with zero length Contents", handler_res, in main()
|
D | test-memset_s.c | 55 #define TEST_RES(cond, msg, handler_res, test_id) \ macro 115 TEST_RES(res == 0, "Normal Set", handler_res, test_id); in main() 116 TEST_RES(strcmp(buf, "AAAAAAAAAAAAA") == 0, "Normal Set Contents", in main() 123 TEST_RES(res == 0, "Zero-length Set", handler_res, test_id); in main() 124 TEST_RES(strcmp(buf, "AAAAAAAAAAAAA") == 0, "Zero-length Set Contents", in main() 131 TEST_RES(res != 0, "NULL Destination Pointer", handler_res, test_id); in main() 138 TEST_RES(res != 0, "Set with zero buffer size", handler_res, test_id); in main()
|
D | test-strnlen_s.c | 55 #define TEST_RES(cond, msg, handler_res, test_id) \ macro 114 TEST_RES(length == 13, "Normal length", handler_res, test_id); in main() 120 TEST_RES(length == 13, "Length with exact buffer size", handler_res, in main() 127 TEST_RES(length == 5, "Length with insufficient buffer", handler_res, in main() 134 TEST_RES(length == 0, "Length of empty string", handler_res, test_id); in main() 140 TEST_RES(length == 0, "Length with Null string", handler_res, test_id); in main() 146 TEST_RES(length == 0, "Length with zero buffer size", handler_res, test_id); in main()
|
D | test-strerror_s.c | 55 #define TEST_RES(cond, msg, handler_res, test_id) \ macro 115 TEST_RES(res == 0, "Normal error message", handler_res, test_id); in main() 116 TEST_RES(strcmp(buf, "Invalid argument") == 0, in main() 123 TEST_RES(res == ERANGE, "Buffer too small", handler_res, test_id); in main() 129 TEST_RES(res != 0, "Null Destination Pointer", handler_res, test_id); in main() 136 TEST_RES(res != 0, "Zero-length Buffer", handler_res, test_id); in main() 142 TEST_RES(res == 0, "Unknown error code", handler_res, test_id); in main()
|
D | test-strerrorlen_s.c | 55 #define TEST_RES(cond, msg, handler_res, test_id) \ macro 114 TEST_RES(length == strlen("Invalid argument"), "Normal error code length", in main() 121 TEST_RES(length == 0, "Unknown error code length", handler_res, test_id); in main()
|