26 lines
608 B
C++
26 lines
608 B
C++
#include "Solver.h"
|
|
#include <cassert>
|
|
#include <filesystem>
|
|
#include <fstream>
|
|
#include <iostream>
|
|
|
|
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.Noyau() == noyau);
|
|
}
|
|
return 0;
|
|
} |