fix comparators func name
This commit is contained in:
@@ -37,16 +37,16 @@ namespace hack::comparators
|
||||
namespace {
|
||||
struct comp_result
|
||||
{
|
||||
bool m_is_equal; // Результат сравнения
|
||||
size_t m_file_size; // Размер массива из файла
|
||||
size_t m_input_size; // Размер входного массива
|
||||
size_t m_mismatch_count; // Количество несовпадающих элементов
|
||||
bool m_is_equal; // Результат сравнения
|
||||
size_t m_file_size; // Размер массива из файла
|
||||
size_t m_input_size; // Размер входного массива
|
||||
size_t m_mismatch_count; // Количество несовпадающих элементов
|
||||
std::vector<size_t> m_mismatch_indices; // Индексы несовпадений
|
||||
};
|
||||
|
||||
// epsilon - допустимая погрешность для float
|
||||
template<typename T>
|
||||
comp_result compare_float_array_with_file(const std::vector<T>& in, const std::filesystem::path& path, float epsilon = 0.000'01)
|
||||
comp_result compare_array_with_file(const std::vector<T>& in, const std::filesystem::path& path, float epsilon = 0.000'01)
|
||||
{
|
||||
comp_result res{};
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace hack::comparators
|
||||
template<typename T>
|
||||
inline void compare(const std::vector<T>& in, const std::filesystem::path& path, float epsilon = 1e-6f)
|
||||
{
|
||||
auto r = compare_float_array_with_file(in, path, epsilon);
|
||||
auto r = compare_array_with_file(in, path, epsilon);
|
||||
log().set_devider("");
|
||||
log()("result: ", r.m_is_equal == true ? "TRUE " : "FALSE ");
|
||||
if (!r.m_is_equal)
|
||||
|
||||
Reference in New Issue
Block a user