aboutsummaryrefslogtreecommitdiff
path: root/source/tests/test_mem.c
diff options
context:
space:
mode:
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;
+}