From 78ab26cc2ba78a8e41ad725ae0fd64bc186c92d4 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Mon, 6 Aug 2018 14:49:07 -0700 Subject: [PATCH] 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. --- libgnucash/engine/test/utest-Invoice.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgnucash/engine/test/utest-Invoice.c b/libgnucash/engine/test/utest-Invoice.c index e7726525ab..4ef8d10e7a 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 );