diff options
author | aqua <aqua@iserlohn-fortress.net> | 2022-11-06 14:48:41 +0200 |
---|---|---|
committer | aqua <aqua@iserlohn-fortress.net> | 2022-11-06 15:03:06 +0200 |
commit | 6d53f16aa508c445309aa4ebe965baa9e17401a1 (patch) | |
tree | bf42dc7dc1105d819a83c1e5a8c8595df19401b6 /lib/tst/mem.c | |
parent | lib/malloc: add linked list implementation (diff) | |
download | kernel-6d53f16aa508c445309aa4ebe965baa9e17401a1.tar.xz |
lib: migrate tests to gtest
Diffstat (limited to 'lib/tst/mem.c')
-rw-r--r-- | lib/tst/mem.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/lib/tst/mem.c b/lib/tst/mem.c deleted file mode 100644 index bccb3a3..0000000 --- a/lib/tst/mem.c +++ /dev/null @@ -1,17 +0,0 @@ -#include <assert.h> - -static const unsigned char data[] = {0xde, 0xca, 0xfa, 0xde}; -static unsigned char buffer[4]; - -void *memset(void *s, int c, long unsigned n); -void *memcpy(void *restrict dest, const void *restrict src, long unsigned n); - -int -main(void) -{ - memset(buffer, 0xae, sizeof(data)); - for (unsigned i = 0; i < sizeof(data); ++i) assert(buffer[i] == 0xae); - - memcpy(buffer, data, sizeof(data)); - for (unsigned i = 0; i < sizeof(data); ++i) assert(buffer[i] == data[i]); -} |