aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest18
1 files changed, 18 insertions, 0 deletions
diff --git a/test b/test
index 2930e89..3256a12 100755
--- a/test
+++ b/test
@@ -115,6 +115,24 @@ public:
115 assert_equal(n, Zmod<12>(4)); 115 assert_equal(n, Zmod<12>(4));
116 } 116 }
117}, 117},
118{
119 .name = "Multiplication overflow",
120 .f = []() {
121 Zmod<10> n = 8;
122 Zmod<10> m = 9;
123 auto prod = m * n;
124 assert_equal(prod.toint64(), 2);
125 }
126},
127{
128 .name = "Multiplication and assignment overflow",
129 .f = []() {
130 Zmod<10> n = 8;
131 Zmod<10> m = 9;
132 n *= m;
133 assert_equal(n.toint64(), 2);
134 }
135},
118}; 136};
119 137
120int main() { 138int main() {