aboutsummaryrefslogtreecommitdiff
path: root/source/tests/test_mem.c
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2020-05-24 16:48:22 +0200
committerToni Uhlig <matzeton@googlemail.com>2020-05-25 21:57:14 +0200
commit31c69b6ca1b91e7fd9fd8e14082fd2584c5f538c (patch)
tree16e789c7d68608831b498f41f54d9482b82a711a /source/tests/test_mem.c
first public release
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'source/tests/test_mem.c')
-rw-r--r--source/tests/test_mem.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/tests/test_mem.c b/source/tests/test_mem.c
new file mode 100644
index 0000000..b16012e
--- /dev/null
+++ b/source/tests/test_mem.c
@@ -0,0 +1,17 @@
+#include "tests.h"
+
+#include "utils.h"
+
+
+BOOL test_memalign(void)
+{
+ DWORD addr = 0x41414141;
+ DWORD size = 512;
+ DWORD algn = 512;
+
+ ERRETCP( XMemAlign(size, algn, addr) == addr+size );
+ size++;
+ ERRETCP( XMemAlign(size, algn, 0) == 1024 );
+ ERRETCP( XMemAlign(size, algn, addr) == addr+1024 );
+ return TRUE;
+}