1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

Fix tests (#405)

* [tonlib] Update master configs and fix test-tonlib-offline

* Fix test-bigint in release build

Co-authored-by: ms <98183742+dungeon-master-666@users.noreply.github.com>
Co-authored-by: dungeon-master-666 <dungeon666master@protonmail.com>
This commit is contained in:
EmelyanenkoK 2022-06-13 20:02:32 +03:00 committed by GitHub
parent c00302ced4
commit 8537dd60e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 124 additions and 155 deletions

View file

@ -786,7 +786,9 @@ struct ModArray {
}
ModArray& operator/=(const ModArray& other) {
assert(try_divide(other) && "division by zero?");
if (!try_divide(other)) {
assert(false); // division by zero?
}
return *this;
}
@ -1051,7 +1053,9 @@ void init_invm() {
for (int i = 0; i < mod_cnt; i++) {
assert(mod[i] > 0 && mod[i] <= (1 << 30));
for (int j = 0; j < i; j++) {
assert(gcdx(mod[i], mod[j], invm[i][j], invm[j][i]) == 1);
if (gcdx(mod[i], mod[j], invm[i][j], invm[j][i]) != 1) {
assert(false);
}
if (invm[i][j] < 0) {
invm[i][j] += mod[j];
}