Skip to content

Commit

Permalink
Rename function read_file_process -> read_file.
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurent Grémy committed Oct 4, 2018
1 parent bdfe597 commit ccf2f60
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion tests/test_bkz.cpp
Expand Up @@ -274,7 +274,7 @@ int test_filename(const char *input_filename, const int block_size,
{
ZZ_mat<ZT> A, B;
int status = 0;
status |= read_file_process(A, input_filename);
status |= read_file(A, input_filename);
B = A;
status |= test_bkz<ZT>(A, block_size, float_type, flags, prec);
status |= test_bkz_param<ZT>(B, block_size);
Expand Down
6 changes: 3 additions & 3 deletions tests/test_cvp.cpp
Expand Up @@ -89,13 +89,13 @@ int test_filename(const char *input_filename_lattice, const char *input_filename
{
ZZ_mat<ZT> A;
int status = 0;
status |= read_file_process(A, input_filename_lattice);
status |= read_file(A, input_filename_lattice);

vector<Z_NR<mpz_t>> t;
status |= read_file_process(t, input_filename_target);
status |= read_file(t, input_filename_target);

vector<Z_NR<mpz_t>> b;
status |= read_file_process(b, output_filename);
status |= read_file(b, output_filename);

status |= test_cvp<ZT>(A, t, b, method);
return status;
Expand Down
4 changes: 2 additions & 2 deletions tests/test_gso.cpp
Expand Up @@ -151,8 +151,8 @@ template <class ZT, class FT> int test_ggso(ZZ_mat<ZT> &A)
template <class ZT, class FT> int test_filename(const char *input_filename)
{
ZZ_mat<ZT> A;
int status = read_file_process(A, input_filename);
// if status == 1, read_file_process fails.
int status = read_file(A, input_filename);
// if status == 1, read_file fails.
if (status == 1)
{
return 1;
Expand Down
2 changes: 1 addition & 1 deletion tests/test_lll.cpp
Expand Up @@ -119,7 +119,7 @@ int test_filename(const char *input_filename, LLLMethod method, FloatType float_
{
ZZ_mat<ZT> A;
int status = 0;
status |= read_file_process(A, input_filename);
status |= read_file(A, input_filename);
status |= test_lll<ZT>(A, method, float_type, flags, prec);
return status;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_lll_gram.cpp
Expand Up @@ -179,7 +179,7 @@ template <class ZT, class FT> int test_filename(const char *input_filename)
{
ZZ_mat<ZT> A;
int status = 0;
status |= read_file_process(A, input_filename);
status |= read_file(A, input_filename);
status |= test_lll<ZT, FT>(A);
return status;
}
Expand Down
4 changes: 2 additions & 2 deletions tests/test_sieve.cpp
Expand Up @@ -58,9 +58,9 @@ template <class ZT> int test_filename(const char *input_filename, const char *ou
{
ZZ_mat<ZT> A;
int status = 0;
status |= read_file_process(A, input_filename);
status |= read_file(A, input_filename);
vector<Z_NR<mpz_t>> b;
status |= read_file_process(b, output_filename);
status |= read_file(b, output_filename);
status |= test_sieve<ZT>(A, b);
return status;
}
Expand Down
4 changes: 2 additions & 2 deletions tests/test_svp.cpp
Expand Up @@ -266,10 +266,10 @@ int test_filename(const char *input_filename, const char *output_filename,
{
ZZ_mat<ZT> A;
int status = 0;
status |= read_file_process(A, input_filename);
status |= read_file(A, input_filename);

vector<Z_NR<mpz_t>> b;
status |= read_file_process(b, output_filename);
status |= read_file(b, output_filename);

switch (test)
{
Expand Down
2 changes: 1 addition & 1 deletion tests/test_utils.h
Expand Up @@ -12,7 +12,7 @@ using namespace fplll;
@param input_filename
@return zero if the file is correctly read, 1 otherwise.
*/
template <class T> int read_file_process(T &X, const char *input_filename) {
template <class T> int read_file(T &X, const char *input_filename) {
int status = 0;
ifstream is;
is.exceptions(std::ifstream::failbit | std::ifstream::badbit);
Expand Down

0 comments on commit ccf2f60

Please sign in to comment.