Skip to content

Commit

Permalink
Correct comments on fake functions of the test application
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Gruber committed Jul 9, 2020
1 parent 1e2236a commit af3353a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions gnucash/import-export/test/gtest-import-backend.cpp
Expand Up @@ -43,23 +43,26 @@ testing::Environment* const env = testing::AddGlobalTestEnvironment(new TestEnvi



/* mock functions, which can not be mocked by mock classes */
/* required fake functions from engine sources, which should not be linked to the test application */

// fake function from qofutil.cpp
gint
safe_strcasecmp (const gchar * da, const gchar * db)
{
// use simplified case-sensitive string comparison as mock up
return g_strcmp0(da, db);
}

// fake function from qoflog.cpp
const char *
qof_log_prettify (const char *name)
{
// do nothing
return name;
}

// this is a slightly modified version of the function from engine-helpers.c
// fake function from engine-helpers.c
// this is a slightly modified version of the original function
const char *
gnc_get_num_action (const Transaction *trans, const Split *split)
{
Expand All @@ -79,6 +82,10 @@ gnc_get_num_action (const Transaction *trans, const Split *split)
else return NULL;
}


/* required fake functions from app-utils sources, which should not be linked to the test application */

// fake function from gnc-ui-util.c
QofBook *
gnc_get_current_book (void)
{
Expand Down

0 comments on commit af3353a

Please sign in to comment.