From e15d8dd3d27047043a371421e59bc11c83a7a1b5 Mon Sep 17 00:00:00 2001 From: mihael Date: Fri, 20 Mar 2026 18:03:36 +0100 Subject: [PATCH] `libc-test/math`: Enable `rint` tests The `rint` tests were commented out when added along with other functions to the `libc-test` runner, presumably because they were failing. In the meantime, we moved to using a Zig-implemented `rint` and I found that the tests are now passing. To celebrate, I'm putting them back into commission. Having these tests in a working state is nice because functions like `lrint`, `llrint`, and `nearbyint` depend on `rint` implementation being correct. Results: ``` $ ./build/stage3/bin/zig build -p stage4 -Denable-llvm -Dno-lib $ stage4/bin/zig build test-libc -Dlibc-test-path= -Dtest-filter=rint -fqemu -fwasmtime --summary line Build Summary: 2209/2209 steps succeeded ``` --- test/libc.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/libc.zig b/test/libc.zig index 423533cc868486599dfaf4b31cf3a3aed0f84fa2..ad6b1af176d5afcc9c7385a45f9964df1ff6af92 100644 --- a/test/libc.zig +++ b/test/libc.zig @@ -293,7 +293,7 @@ pub fn addCases(cases: *tests.LibcContext) void { cases.addLibcTestCase("math/remquo.c", true, .{}); cases.addLibcTestCase("math/remquof.c", true, .{}); cases.addLibcTestCase("math/remquol.c", true, .{}); - // cases.addLibcTestCase("math/rint.c", true, .{}); + cases.addLibcTestCase("math/rint.c", true, .{}); cases.addLibcTestCase("math/rintf.c", true, .{}); // cases.addLibcTestCase("math/rintl.c", true, .{}); cases.addLibcTestCase("math/round.c", true, .{}); -- 2.54.0