From 4ededf8a3649fcd2509b8832289745c5039b60e7 Mon Sep 17 00:00:00 2001 From: Chris Shoemaker Date: Tue, 17 Jan 2006 02:28:13 +0000 Subject: [PATCH] sane indenting git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12817 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/engine/test/test-lots.c | 47 +++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/src/engine/test/test-lots.c b/src/engine/test/test-lots.c index c6148429f0..57f31ebe08 100644 --- a/src/engine/test/test-lots.c +++ b/src/engine/test/test-lots.c @@ -72,28 +72,29 @@ run_test (void) int main (int argc, char **argv) { - gint i; + gint i; - qof_init(); - if(cashobjects_register()) { - /* Any tests that cause an error or warning to be printed - * automatically fail! */ - g_log_set_always_fatal( G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING ); - /* Set up a reproducible test-case */ - srand(0); - /* Iterate the test a number of times */ - for (i=0; i< max_iterate; i++) - { - fprintf(stdout, " Lots: %d of %d paired tests . . . \r", - (i + 1)*2, max_iterate * 2); - fflush(stdout); - run_test (); - } - /* 'erase' the recurring tag line with dummy spaces. */ - fprintf(stdout, "Lots: Test series complete. \n"); - fflush(stdout); - print_test_results(); - } - qof_close(); - return 0; + qof_init(); + if (!cashobjects_register()) + exit(1); + + /* Any tests that cause an error or warning to be printed + * automatically fail! */ + g_log_set_always_fatal( G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING ); + /* Set up a reproducible test-case */ + srand(0); + /* Iterate the test a number of times */ + for (i=0; i< max_iterate; i++) { + fprintf(stdout, " Lots: %d of %d paired tests . . . \r", + (i + 1)*2, max_iterate * 2); + fflush(stdout); + run_test (); + } + /* 'erase' the recurring tag line with dummy spaces. */ + fprintf(stdout, "Lots: Test series complete. \n"); + fflush(stdout); + print_test_results(); + + qof_close(); + return 0; }