r15628 - gnucash/trunk/src - Remove DISPLAY-using, not-very-useful test.

Josh Sled jsled at cvs.gnucash.org
Mon Feb 19 14:45:19 EST 2007


Author: jsled
Date: 2007-02-19 14:45:19 -0500 (Mon, 19 Feb 2007)
New Revision: 15628
Trac: http://svn.gnucash.org/trac/changeset/15628

Removed:
   gnucash/trunk/src/gnome-utils/test/test-sx.c
Modified:
   gnucash/trunk/src/doc/sx.rst
   gnucash/trunk/src/gnome-utils/test/Makefile.am
Log:
Remove DISPLAY-using, not-very-useful test.


Modified: gnucash/trunk/src/doc/sx.rst
===================================================================
--- gnucash/trunk/src/doc/sx.rst	2007-02-19 19:24:23 UTC (rev 15627)
+++ gnucash/trunk/src/doc/sx.rst	2007-02-19 19:45:19 UTC (rev 15628)
@@ -60,7 +60,7 @@
   - [ ] bugs
     - [?] Expired scheduled transactions never run - <http://bugzilla.gnome.org/show_bug.cgi?id=375892>
   - remove
-    - [ ] display-using src/gnome-utils/test/test-sx.c
+    - [x] display-using src/gnome-utils/test/test-sx.c
 
 - bugs
   - [ ] auto-create (+notify) txns not in review list. [ve20070209]_
@@ -79,7 +79,6 @@
 
 - sx list page
 ! - [ ] use gnc-tree-view?
-! - [ ] save/restore size
   - [/] make into split panel
     - [ ] fix slider position
   - [ ] {0, 1, 2, 4, 8, 12} month selection for dense calendar
@@ -138,6 +137,8 @@
     - [ ] gnc_sxed_check_consistent
     - [x] gnc_sxed_update_cal
     - [x] gnc_sxed_save_sx
+  - gnc-instances
+    - [ ] More compact recurrenceListToString(...).
   - [ ] remove FreqSpec code
     - [ ] SX code
     - [ ] src/gnome/druid-acct-period.c

Modified: gnucash/trunk/src/gnome-utils/test/Makefile.am
===================================================================
--- gnucash/trunk/src/gnome-utils/test/Makefile.am	2007-02-19 19:24:23 UTC (rev 15627)
+++ gnucash/trunk/src/gnome-utils/test/Makefile.am	2007-02-19 19:45:19 UTC (rev 15628)
@@ -1,5 +1,5 @@
 TESTS =  \
-  test-link-module test-load-module test-sx
+  test-link-module test-load-module
 
 # The following tests are nice, but have absolutely no place in an
 # automated testing system.
@@ -27,7 +27,7 @@
   $(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
 
 check_PROGRAMS = \
-  test-link-module test-gnc-recurrence test-gnc-dialog test-sx
+  test-link-module test-gnc-recurrence test-gnc-dialog
 
 INCLUDES= \
   -I${top_srcdir}/src \

Deleted: gnucash/trunk/src/gnome-utils/test/test-sx.c
===================================================================
--- gnucash/trunk/src/gnome-utils/test/test-sx.c	2007-02-19 19:24:23 UTC (rev 15627)
+++ gnucash/trunk/src/gnome-utils/test/test-sx.c	2007-02-19 19:45:19 UTC (rev 15628)
@@ -1,83 +0,0 @@
-#include "config.h"
-#include <glib.h>
-#include "glib-compat.h"
-#include "qof.h"
-#include "gnc-engine.h"
-#include "gnc-sx-instance-model.h"
-#include "gnc-sx-instance-dense-cal-adapter.h"
-#include "gnc-dense-cal.h"
-#include "gnc-dense-cal-model.h"
-
-#include "test-stuff.h"
-#include "test-engine-stuff.h"
-
-static void
-_removing(GObject *obj, SchedXaction *removing, gpointer unused_user_data)
-{
-     gnc_sx_instance_model_remove_sx_instances(GNC_SX_INSTANCE_MODEL(obj), removing);
-}
-
-static void
-setup_default_handlers(GncSxInstanceModel *model)
-{
-     g_signal_connect(model, "removing", (GCallback)_removing, NULL);
-}
-
-static void
-test()
-{
-     GDate *start, *end;
-     GncSxInstanceModel *model;
-     GncSxInstanceDenseCalAdapter *dense_cal_model;
-     GncDenseCal *cal;
-     SchedXaction *foo, *bar;
-
-     start = g_date_new();
-     g_date_clear(start, 1);
-     g_date_set_time_t(start, time(NULL));
-
-     end = g_date_new();
-     g_date_clear(end, 1);
-     g_date_set_time_t(end, time(NULL));
-     g_date_add_years(end, 1);
-     
-     foo = add_daily_sx("foo", start, NULL, NULL);
-
-     model = gnc_sx_get_instances(end, TRUE);
-     setup_default_handlers(model);
-
-     do_test(g_list_length(model->sx_instance_list) == 1, "1 instances");
-
-     dense_cal_model = gnc_sx_instance_dense_cal_adapter_new(model);
-     cal = GNC_DENSE_CAL(gnc_dense_cal_new_with_model(GNC_DENSE_CAL_MODEL(dense_cal_model)));
-     // gobject-2.10: g_object_ref_sink(cal);
-     g_object_ref(G_OBJECT(cal));
-     gtk_object_sink(GTK_OBJECT(cal));
-
-     bar = add_daily_sx("bar", start, NULL, NULL);
-     do_test(g_list_length(model->sx_instance_list) == 2, "2 instances");
-
-     remove_sx(foo);
-
-     do_test(g_list_length(model->sx_instance_list) == 1, "1 instance");
-
-     g_object_unref(cal);
-     success("freed calendar");
-     g_object_unref(dense_cal_model);
-     success("freed dense-cal model");
-     g_object_unref(model);
-     success("freed instances");
-}
-
-int
-main(int argc, char **argv)
-{
-     g_type_init();
-     gnc_engine_init(argc, argv);
-     gtk_init(&argc, &argv);
-
-     test();
-
-     print_test_results();
-     exit(get_rv());
-}



More information about the gnucash-changes mailing list