Skip to content

Commit

Permalink
CsvImp - minor cleanups in test code
Browse files Browse the repository at this point in the history
  • Loading branch information
gjanssens committed Sep 11, 2024
1 parent 75b7c7b commit 64f2d90
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions gnucash/import-export/csv-imp/test/test-tokenizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,20 @@
#include <stdlib.h> /* getenv */


typedef struct
struct tokenize_csv_test_data
{
const char *csv_line;
uint num_fields;
const char *fields [8];
} tokenize_csv_test_data;
};

typedef struct
struct tokenize_fw_test_data
{
const char *fw_line;
uint num_fields;
uint field_widths[8];
const char *fields [8];
} tokenize_fw_test_data;
};

class GncTokenizerTest : public ::testing::Test
{
Expand All @@ -68,7 +68,7 @@ class GncTokenizerTest : public ::testing::Test
void set_utf8_contents(std::unique_ptr<GncTokenizer> &tokenizer, const std::string& newcontents)
{ tokenizer->m_utf8_contents = newcontents; }
void test_gnc_tokenize_helper (const std::string& separators, tokenize_csv_test_data* test_data); // for csv tokenizer
void test_gnc_tokenize_helper (tokenize_fw_test_data* test_data); // for csv tokenizer
void test_gnc_tokenize_helper (tokenize_fw_test_data* test_data); // for fw tokenizer

std::unique_ptr<GncTokenizer> fw_tok;
std::unique_ptr<GncTokenizer> csv_tok;
Expand Down
4 changes: 2 additions & 2 deletions gnucash/import-export/csv-imp/test/test-tx-import.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@
// GncTxImport* parse_data;
//} Fixture;

typedef struct
struct parse_date_data
{
int date_fmt;
const gchar *date_str;
int exp_year;
int exp_month;
int exp_day;
} parse_date_data;
};

class GncTxImportTest : public ::testing::Test
{
Expand Down

0 comments on commit 64f2d90

Please sign in to comment.