aboutsummaryrefslogtreecommitdiffstats
path: root/libj2_ju_sub_ju_to_j2u.c
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2025-12-06 10:21:36 +0100
committerMattias Andrée <m@maandree.se>2025-12-06 10:21:36 +0100
commitc28859c3e10c84fd9f81ebf88336c9b693448eeb (patch)
tree22f9804f4ba96474c23c93c021d293ba5959ccfa /libj2_ju_sub_ju_to_j2u.c
parentSecond commit (diff)
downloadlibj2-c28859c3e10c84fd9f81ebf88336c9b693448eeb.tar.gz
libj2-c28859c3e10c84fd9f81ebf88336c9b693448eeb.tar.bz2
libj2-c28859c3e10c84fd9f81ebf88336c9b693448eeb.tar.xz
Add overflow and underflow prediction functions
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'libj2_ju_sub_ju_to_j2u.c')
-rw-r--r--libj2_ju_sub_ju_to_j2u.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libj2_ju_sub_ju_to_j2u.c b/libj2_ju_sub_ju_to_j2u.c
index b61e96a..5de5046 100644
--- a/libj2_ju_sub_ju_to_j2u.c
+++ b/libj2_ju_sub_ju_to_j2u.c
@@ -36,6 +36,8 @@ check(uintmax_t a, uintmax_t b)
r = (struct libj2_j2u){111, 222};
EXPECT(libj2_ju_sub_ju_to_j2u_overflow(a, b, &r) == expected_overflow);
EXPECT(libj2_j2u_eq_j2u(&r, &expected));
+
+ EXPECT(libj2_ju_sub_ju_overflow_p(a, b) == expected_overflow);
}