aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2026-03-20 17:59:56 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2026-03-20 17:59:56 +0100
commit77de9119efbee9e65f0b50fc8b9315b6fb0910fb (patch)
tree17a335925106f44e6b3178c8c61beba583d3b42d /test
parentd16656919753438a57a32f9ad6ba972c25d66b11 (diff)
downloadzmodn-master.tar.gz
zmodn-master.zip
Added support for _BitInt (available in clang)HEADmaster
Diffstat (limited to '')
-rwxr-xr-xtest18
1 files changed, 18 insertions, 0 deletions
diff --git a/test b/test
index 46ed7c3..2657439 100755
--- a/test
+++ b/test
@@ -12,6 +12,10 @@ exit 0
12#include "zmodn.h" 12#include "zmodn.h"
13#include "bigint.h" 13#include "bigint.h"
14 14
15#if defined(__clang__) && __clang_major__ >= 16
16#include "bitint_wrapper.h"
17#endif
18
15#include <concepts> 19#include <concepts>
16#include <functional> 20#include <functional>
17#include <iostream> 21#include <iostream>
@@ -479,6 +483,20 @@ public:
479 assert_equal(inv.value().toint(), expected); 483 assert_equal(inv.value().toint(), expected);
480 } 484 }
481}, 485},
486#if defined(__clang__) && __clang_major__ >= 16
487{
488 .name = "Zmod with BitInt",
489 .f = []() {
490 constexpr BitInt N{1000000000000LL}; // 1e12
491 BitInt a{600000000000LL}; // 6e11
492 BitInt b{700000000000LL}; // 7e11
493 BitInt c{300000000000LL}; // 3e11
494
495 Zmod<N> a_modN(a), b_modN(b), c_modN(c);
496 assert_equal(a_modN + b_modN, c_modN);
497 }
498},
499#endif
482/* 500/*
483{ 501{
484 .name = "This does not compile", 502 .name = "This does not compile",

Generated with cgit - Back to sebastiano.tronto.net