aboutsummaryrefslogtreecommitdiffstats
path: root/test/mem/memswap.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/mem/memswap.c')
-rw-r--r--test/mem/memswap.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/mem/memswap.c b/test/mem/memswap.c
new file mode 100644
index 0000000..a5be39f
--- /dev/null
+++ b/test/mem/memswap.c
@@ -0,0 +1,11 @@
+#include <mem.h>
+
+static int const a = 1;
+static int const b = 2;
+
+int main(void){
+ int x = a;
+ int y = b;
+ calt_memswap(&x, &y, sizeof x);
+ return x == b && y == a ? 0 : 1;
+}