mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Enable test to handle attempt to load non-existing file in csv importer
This commit is contained in:
parent
89c1534d51
commit
6fe7d88548
@ -73,7 +73,7 @@ public:
|
||||
const std::string& encoding();
|
||||
virtual int tokenize() = 0;
|
||||
const std::vector<StrVec>& get_tokens();
|
||||
|
||||
|
||||
protected:
|
||||
std::string m_utf8_contents;
|
||||
std::vector<StrVec> m_tokenized_contents;
|
||||
|
@ -84,16 +84,15 @@ std::string GncTokenizerTest::get_filepath(const std::string& filename)
|
||||
return std::string(srcdir) + "/" + filename;
|
||||
}
|
||||
|
||||
//TEST_F (GncTokenizerTest, load_file_nonexisting)
|
||||
//{
|
||||
//
|
||||
// auto file1 = get_filepath ("notexist.csv");
|
||||
//
|
||||
// /* Test loading of a non-existing file */
|
||||
// // FIXME determine what is actually thrown as I can't find it by trial and error
|
||||
// EXPECT_THROW (fw_tok->load_file (file1), std::ios_base::failure);
|
||||
// EXPECT_THROW (csv_tok->load_file (file1), std::ios_base::failure);
|
||||
//}
|
||||
TEST_F (GncTokenizerTest, load_file_nonexisting)
|
||||
{
|
||||
|
||||
auto file1 = get_filepath ("notexist.csv");
|
||||
|
||||
/* Test loading of a non-existing file */
|
||||
EXPECT_THROW (fw_tok->load_file (file1), std::ios_base::failure);
|
||||
EXPECT_THROW (csv_tok->load_file (file1), std::ios_base::failure);
|
||||
}
|
||||
|
||||
TEST_F (GncTokenizerTest, load_file_existing)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user