aboutsummaryrefslogtreecommitdiffstats
path: root/test.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-04-27 17:19:53 +0200
committerMattias Andrée <maandree@kth.se>2016-04-27 17:19:53 +0200
commite746f06265981fd17bc656ca59e0ed82f6cea84d (patch)
tree9161d4428b889f7aa4375988c4fdc29e1ab02ee2 /test.c
parentMinor word fix in STATUS (diff)
downloadlibzahl-e746f06265981fd17bc656ca59e0ed82f6cea84d.tar.gz
libzahl-e746f06265981fd17bc656ca59e0ed82f6cea84d.tar.bz2
libzahl-e746f06265981fd17bc656ca59e0ed82f6cea84d.tar.xz
Add option UNSAFE which disables all internal error checks
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'test.c')
-rw-r--r--test.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/test.c b/test.c
index 5b7642a..ffd9066 100644
--- a/test.c
+++ b/test.c
@@ -787,6 +787,9 @@ main(void)
assert((zseti(a, 11), zptest(0, a, 100)), != NONPRIME);
assert((zseti(a, 101), zptest(0, a, 100)), != NONPRIME);
+#if defined(UNSAFE)
+ (void) env2;
+#else
assert_nr(zdivmod(a, b, _0, _0));
assert_nr(zdivmod(a, b, _1, _0));
zdivmod(a, b, _0, _1);
@@ -828,6 +831,7 @@ main(void)
assert_nr(zmodpowu(a, _0, 1, _0));
assert_nr(zmodpowu(a, _1, 0, _0));
assert_nr((zneg(_1, _1), zmodpowu(a, _1, 0, _0))); zneg(_1, _1);
+#endif
zsetu(a, 1LL);
assert_s(zstr(a, buf, 1), "1");