-
Notifications
You must be signed in to change notification settings - Fork 67
/
string_tests.c
44 lines (39 loc) · 1.07 KB
/
string_tests.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
* Copyright © 2017 Embedded Artistry LLC.
* License: MIT. See LICENSE file for details.
*/
#include <stdlib.h>
#include "string_tests.h"
#include <tests.h>
// Cmocka needs these
// clang-format off
#include <setjmp.h>
#include <stdarg.h>
#include <stddef.h>
#include <cmocka.h>
// clang-format on
int string_tests(void)
{
int overall_result = 0;
overall_result |= memcpy_tests();
overall_result |= memset_tests();
overall_result |= memmem_tests();
overall_result |= memmove_tests();
overall_result |= memcmp_tests();
overall_result |= strcmp_tests();
overall_result |= strcpy_tests();
overall_result |= strdup_tests();
overall_result |= strlen_tests();
overall_result |= strncmp_tests();
overall_result |= strncpy_tests();
overall_result |= strndup_tests();
overall_result |= strnlen_tests();
overall_result |= strnstr_tests();
overall_result |= strstr_tests();
overall_result |= strchr_tests();
overall_result |= strrchr_tests();
overall_result |= strcat_tests();
overall_result |= strncat_tests();
overall_result |= strtok_tests();
return overall_result;
}