Commit Graph

29 Commits

Author SHA1 Message Date
Jason Hansel a5409ecd36 Fix out-of-bounds error in strsignal 2019-06-10 10:25:59 -04:00
Mateusz Mikuła d62db7b1b9 Add memrchr() 2019-05-11 13:49:46 +02:00
Alex Lyon 5bbce37789 string: add strnlen_s() 2019-04-26 20:36:37 -07:00
Tibor Nagy 2d027f0771 tests: More work on error handling 2019-02-24 00:46:26 +01:00
Tibor Nagy 9a0ea6ff34 tests: More refactoring, add helper header to every test, override exit for better error reporting 2019-02-21 21:13:28 +01:00
Tibor Nagy d1a424c002 tests: Replace returns with exits in the main functions
This will allow us to redefine the exit function.

For example:
```
#define exit(code) { \
    fprintf(stderr, "%s:%d: exit(%s) in function ‘%s’\n",
        __FILE__, __LINE__, #code, __func__); \
    _exit(code); \
}
```
2019-02-21 12:15:06 +01:00
Tibor Nagy 4381bb2a22 tests: Remove redundant return statements
When the execution reaches the end of the main functions, they implicitly return a successful status.
2019-02-20 21:09:03 +01:00
Tibor Nagy c19cc8b731 tests: Portability fixes, replaced 0/1/-1 return codes with macros 2019-02-20 20:20:07 +01:00
Tibor Nagy ff874c87d7 tests: Fix function signatures 2019-02-20 19:27:18 +01:00
Tibor Nagy 7ee59d2fdb tests: set C11, enable pedantic warnings, fix GCC and Clang warnings 2019-02-20 15:04:47 +01:00
Jeremy Soller 9325183b21 Fix strcat 2018-12-01 08:55:02 -07:00
jD91mZM2 0469c0c2c6 Add tests for memcmp and fix a teeny tiny bug 2018-10-09 16:47:57 +02:00
jD91mZM2 26d629674a Implement strcasestr 2018-10-06 17:37:50 +02:00
jD91mZM2 3bb3a3e322 Fix strcpy 2018-08-07 11:35:23 +02:00
jD91mZM2 67d5976622 Clean up tests 2018-07-22 11:24:50 +02:00
jD91mZM2 d3f6985ee9 Add a few things necessary for openssl (not all) 2018-07-08 08:44:23 +02:00
Timothy Bess e91891625f * add strtok_r 2018-03-17 03:56:40 -04:00
Timothy Bess 898cf98ccc * fix test case a bit
* remove unnecessary cast
2018-03-17 03:06:59 -04:00
Timothy Bess f60fafe8fb * create basic strtok
* add test and expected output
2018-03-17 02:58:08 -04:00
Jeremy Soller a1baf1c92d Merge pull request #75 from azymohliad/master
Implement strstr() and strpbrk() from string.h
2018-03-14 21:22:59 -06:00
Tom Almeida b2d01a67f2 Actual working tests on strspn and strcspn 2018-03-14 10:55:01 +08:00
Andrii Zymohliad c4620be999 Prettify strpbrk and strstr tests 2018-03-12 18:22:39 +08:00
Andrii Zymohliad 1e969afd43 Implement strpbrk(), add strpbrk test 2018-03-12 18:01:12 +08:00
Andrii Zymohliad a1de0ef8a1 Implement strstr(), add strstr test 2018-03-12 14:55:02 +08:00
Justin Raymond a1e62baad7 Merge branch 'master' into strrchr 2018-03-10 11:11:46 -05:00
Justin Raymond 826cf0c61c implement strrchr 2018-03-10 11:10:19 -05:00
Tom Almeida 18283feac1 Added implementations of strchr, strcspn and strspn 2018-03-10 22:58:35 +08:00
Alex Lyon cfc1014c6e string: fix a couple minor issues in strncmp() 2018-03-09 20:54:42 -08:00
Alex Lyon 50f79e9a0e string: address performance concerns for strncmp() 2018-03-09 20:54:42 -08:00