allow tests in release mode
All checks were successful
Linux arm64 / Build (push) Successful in 6m40s

This commit is contained in:
2024-05-04 12:42:26 +02:00
parent 851080c7a4
commit f5a282c455
6 changed files with 80 additions and 38 deletions

View File

@@ -1,5 +1,6 @@
#include "Solver.h"
#include <cassert>
#include "test_assert.h"
#include <cstdlib>
#include <future>
#include <iostream>
@@ -42,18 +43,18 @@ static void Test() {
nullVector.Fill(0.0);
for (std::size_t i = 0; i < kernel.GetCardinal(); i++) {
assert(matrix * kernel.GetVector(i) == nullVector);
test_assert(matrix * kernel.GetVector(i) == nullVector);
}
for (std::size_t i = 0; i < KERNEL_CHECKS; i++) {
Matrix vector = GetRandomMatrix(kernel.GetDimension(), 1);
assert(kernel.IsElementOf(vector) == (matrix * vector == nullVector));
test_assert(kernel.IsElementOf(vector) == (matrix * vector == nullVector));
}
Vect kernel2 = solver.Kernel(kernel.GetLinearSystem());
assert(kernel == kernel2);
test_assert(kernel == kernel2);
}
int main() {
@@ -61,6 +62,7 @@ int main() {
std::vector<std::future<void>> results;
// appelle la fonction Test() en parallèle
for (int i = 0; i < EXECUTION_COUNT; i++) {
auto handle = std::async(std::launch::async, &Test);
results.push_back(std::move(handle));