31 lines
621 B
C++
31 lines
621 B
C++
#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;
|
|
|
|
Vect image {imageMat};
|
|
Vect noyau {noyauMat};
|
|
|
|
Solver solver {mat};
|
|
|
|
assert(solver.Image() == image);
|
|
assert(solver.Kernel() == noyau);
|
|
}
|
|
return 0;
|
|
} |