gnucash maint: Fix gncInvoice test failure.
John Ralls
jralls at code.gnucash.org
Mon Aug 6 17:49:18 EDT 2018
Updated via https://github.com/Gnucash/gnucash/commit/78ab26cc (commit)
from https://github.com/Gnucash/gnucash/commit/d87fa3a5 (commit)
commit 78ab26cc2ba78a8e41ad725ae0fd64bc186c92d4
Author: John Ralls <jralls at ceridwen.us>
Date: Mon Aug 6 14:49:07 2018 -0700
Fix gncInvoice test failure.
test_suite_gncInvoice sets up the test suite. It's not part of the test
runtime, so stack variables in it have gone out of scope by the time the
tests are actually run. Making invoiceData static makes it permanent so
it exists at runtime.
diff --git a/libgnucash/engine/test/utest-Invoice.c b/libgnucash/engine/test/utest-Invoice.c
index e772652..4ef8d10 100644
--- a/libgnucash/engine/test/utest-Invoice.c
+++ b/libgnucash/engine/test/utest-Invoice.c
@@ -205,7 +205,7 @@ test_invoice_posted_trans ( Fixture *fixture, gconstpointer pData )
void
test_suite_gncInvoice ( void )
{
- InvoiceData pData = { FALSE, FALSE, { 1000, 100 }, { 2000, 100 } }; // Vendor bill
+ static InvoiceData pData = { FALSE, FALSE, { 1000, 100 }, { 2000, 100 } }; // Vendor bill
GNC_TEST_ADD( suitename, "post/unpost", Fixture, &pData, setup, test_invoice_post, teardown );
GNC_TEST_ADD( suitename, "post trans - vendor bill", Fixture, &pData, setup_with_invoice, test_invoice_posted_trans, teardown_with_invoice );
Summary of changes:
libgnucash/engine/test/utest-Invoice.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
More information about the gnucash-changes
mailing list