format test_solver
All checks were successful
Linux arm64 / Build (push) Successful in 5m19s

This commit is contained in:
2024-02-21 22:06:08 +01:00
parent 54798d0ff2
commit efd0a88868

View File

@@ -1,17 +1,21 @@
#include "Solver.h"
#include <cassert>
#include <filesystem>
#include <fstream>
#include <iostream>
#include "Solver.h"
namespace fs = std::filesystem;
int main() {
std::string path = "test";
for (const auto& entry : fs::directory_iterator(path)) {
std::string fileName = entry.path().string();
std::cout << "Opening " << fileName << " ...\n";
std::ifstream in{fileName};
Matrix mat{1, 1}, imageMat{1, 1}, noyauMat{1, 1};
in >> mat >> imageMat >> noyauMat;
@@ -19,6 +23,7 @@ int main() {
Vect noyau{noyauMat};
Solver solver{mat};
assert(solver.Image() == image);
assert(solver.Noyau() == noyau);
}