aboutsummaryrefslogtreecommitdiffstats
path: root/libj2_j2u_max.c
diff options
context:
space:
mode:
Diffstat (limited to 'libj2_j2u_max.c')
-rw-r--r--libj2_j2u_max.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/libj2_j2u_max.c b/libj2_j2u_max.c
new file mode 100644
index 0000000..a6b7317
--- /dev/null
+++ b/libj2_j2u_max.c
@@ -0,0 +1,27 @@
+/* See LICENSE file for copyright and license details. */
+#include "common.h"
+#ifndef TEST
+
+extern inline void libj2_j2u_max(struct libj2_j2u *res);
+/* TODO Add man page */
+
+
+#else
+
+int
+main(void)
+{
+ struct libj2_j2u value = {1, 2};
+
+ libj2_j2u_max(&value);
+ EXPECT(~value.high == 0);
+ EXPECT(~value.low == 0);
+
+ libj2_j2u_max(&value);
+ EXPECT(~value.high == 0);
+ EXPECT(~value.low == 0);
+
+ return 0;
+}
+
+#endif