Commit Graph

13 Commits

Author SHA1 Message Date
Martin Nordholts edff4949bc app: Call gimp_log_init() in test init functions
Call gimp_log_init() in test init functions so we can use the
GIMP_DEBUG env var.
2010-10-26 14:23:09 +02:00
Martin Nordholts 784a1ce2a9 app: Initialize and restore GIMP in gimp_init_for_testing()
We should initialize and restore GIMP also in gimp_init_for_testing(),
not only in gimp_init_for_gui_testing(), because also non-UI tests
needs e.g. plug-ins to be available.
2010-10-21 21:12:50 +02:00
Martin Nordholts c1c42f193d app: Remove 'use_cpu_accel' from gimp_init_for_{,gui_}testing()
Remove silly 'use_cpu_accel' parameter from gimp_init_for_testing()
and gimp_init_for_gui_testing().
2010-10-09 18:50:34 +02:00
Martin Nordholts 185deee3b2 app: Don't run UI tests when there is no DISPLAY 2010-10-03 11:14:35 +02:00
Martin Nordholts 49d951d49e app: Introduce error margin in sessionrc in test cases
Introduce a few pixels of error margin in sessionrc, otherwise the
tests are too fragile, widgets have a tendency to change size a bit
and window managers have a tendency to move windows a bit.

Still needs more work, should probably do the same on book positions
too...
2010-06-19 23:55:35 +02:00
Martin Nordholts 11b1300b6f app: Introduce gimp_dialog_factory_get_singleton()
Instead of including dialogs/dialogs.h everywhere, introduce
gimp_dialog_factory_get_singleton(). The dialog factory singleton is
still initialized by dialogs.c though.

Right now the assumption is that we never will have another dialog
factory instance around. There were so many problems before when we
had four of them, so let's just keep one of them around.
2010-02-28 23:23:24 +01:00
Martin Nordholts 049de90d81 app: Add gimp_test_run_mainloop_until_idle()
Add function that runs a main loop until it is idle. Useful for test
cases.
2009-12-24 17:50:39 +01:00
Martin Nordholts 1923280e57 app: Add gimp_test_run_temp_mainloop()
Add gimp_test_run_temp_mainloop() which is a helper function for tests
that wants to run a main loop for a while. Useful when you want GIMP's
state to settle before doing tests.
2009-09-17 01:51:53 +02:00
Martin Nordholts 0601229f9f app: Add show_gui parameter to gimp_init_for_gui_testing()
Add show_gui parameter to gimp_init_for_gui_testing() so that we can
have tests that shows the the actual GIMP interface.
2009-09-17 01:51:53 +02:00
Martin Nordholts 86f8e996d7 app: Add gimp_init_for_gui_testing()
In order to allow test cases to test GUI code, add
gimp_init_for_gui_testing() which is like gimp_init_for_testing() but
includes initializations of GUI parts.
2009-09-08 19:28:43 +02:00
Michael Natterer 6542617751 Initialize some more stuff so real tests are possible
* tests.[ch]: initialize base so we have a tile cache and add
  parameter "gboolean use_cpu_accel" so we can test stuff both with
  and without using CPU features.

* tests/test-layer-grouping.c: changed accordingly. Call g_thread_init()
  so the tile cache works (and to be on the safe side in general).
2009-09-07 19:06:57 +02:00
Martin Nordholts 8f999e0842 app: Don't initialize Gimp verbosely in gimp_init_for_testing()
The verbose output of Gimp has little relevance to unit testing,
disable it.
2009-09-05 16:19:52 +02:00
Martin Nordholts 14aa5314af app: Add GIMP core unit testing framework and a simple first test
Enable us to have regression testing by introducing a core testing
framework that uses the GLib JUnit-like test library.

Do this by adding a new subdir app/tests that will contain all our
tests (it contains one trivial test already). Also add app/tests.[ch]
with a new function gimp_init_for_testing() so that test cases can
easily setup the core object system.
2009-09-05 16:02:32 +02:00