void-packages/srcpkgs/singular/patches/upstream_polys_test_musl.patch
2021-11-09 17:02:37 +01:00

23 lines
839 B
Diff

From 6e2383111a18b2fa2d3421045625d1d424eb1e25 Mon Sep 17 00:00:00 2001
From: Hans Schoenemann <hannes@mathematik.uni-kl.de>
Date: Mon, 20 Sep 2021 15:13:36 +0200
Subject: [PATCH] fix: make check: polys_test
---
libpolys/tests/polys_test.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libpolys/tests/polys_test.h b/libpolys/tests/polys_test.h
index 5526aa5a6b..5b4c561238 100644
--- a/libpolys/tests/polys_test.h
+++ b/libpolys/tests/polys_test.h
@@ -2481,7 +2481,7 @@ class PolysTestSuite : public CxxTest::TestSuite
{
for (int qi = 0; qi <= 100; qi++)
{
- int c = rand() % 1000000;
+ int c = rand() % 1000000+1; /* c must not be 0 */
poly qterm = p_ISet(c, r); p_SetExp(qterm, 1, qi, r);
p_Setm(qterm, r);
number qtermAsN = toFractionNumber(qterm, cf);