From c28859c3e10c84fd9f81ebf88336c9b693448eeb Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 6 Dec 2025 10:21:36 +0100 Subject: Add overflow and underflow prediction functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libj2_ju_sub_ju_to_j2u.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libj2_ju_sub_ju_to_j2u.c') 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); } -- cgit v1.2.3-70-g09d2