2008-05-23 15:07:14 -05:00
|
|
|
#include <mooedit/mooedit-tests.h>
|
2010-10-30 23:40:10 -07:00
|
|
|
#include <mooscript/lua/moolua-tests.h>
|
2008-05-23 15:07:14 -05:00
|
|
|
#include <mooutils/mooutils-tests.h>
|
2008-05-15 23:51:55 -05:00
|
|
|
#include <gtk/gtk.h>
|
2008-08-28 22:52:21 -05:00
|
|
|
#include <stdio.h>
|
2008-09-14 03:00:42 -05:00
|
|
|
#include "mem-debug.h"
|
2008-01-19 01:34:21 -06:00
|
|
|
|
2008-05-05 10:13:42 -05:00
|
|
|
static void
|
|
|
|
add_tests (void)
|
2008-01-19 01:34:21 -06:00
|
|
|
{
|
2008-02-02 16:54:52 -06:00
|
|
|
moo_test_gobject ();
|
2008-01-20 03:11:24 -06:00
|
|
|
moo_test_mooaccel ();
|
2008-01-19 01:34:21 -06:00
|
|
|
moo_test_mooutils_fs ();
|
2008-02-20 18:45:20 -06:00
|
|
|
moo_test_moo_file_writer ();
|
2008-02-03 02:02:26 -06:00
|
|
|
moo_test_mooutils_misc ();
|
2010-11-07 22:42:56 -08:00
|
|
|
moo_test_i18n ();
|
2008-01-19 01:34:21 -06:00
|
|
|
|
2008-01-19 04:58:44 -06:00
|
|
|
#ifdef __WIN32__
|
|
|
|
moo_test_mooutils_win32 ();
|
|
|
|
#endif
|
|
|
|
|
2008-01-27 00:04:00 -06:00
|
|
|
moo_test_lua ();
|
|
|
|
|
2010-09-27 01:30:32 -07:00
|
|
|
// moo_test_key_file ();
|
2008-02-10 12:56:31 -06:00
|
|
|
moo_test_editor ();
|
2008-05-05 10:13:42 -05:00
|
|
|
}
|
|
|
|
|
2008-09-14 03:00:42 -05:00
|
|
|
static int
|
2010-10-25 00:05:49 -07:00
|
|
|
unit_tests_main (MooTestOptions opts, char **tests, const char *data_dir_arg)
|
2008-05-05 10:13:42 -05:00
|
|
|
{
|
2010-11-07 23:38:04 -08:00
|
|
|
const char *data_dir = NULL;
|
|
|
|
|
|
|
|
#ifdef MOO_UNIT_TEST_DATA_DIR
|
|
|
|
data_dir = MOO_UNIT_TEST_DATA_DIR;
|
|
|
|
#endif
|
2008-02-10 12:56:31 -06:00
|
|
|
|
2010-10-25 00:05:49 -07:00
|
|
|
if (data_dir_arg)
|
|
|
|
data_dir = data_dir_arg;
|
2008-02-10 12:56:31 -06:00
|
|
|
|
2008-05-05 10:13:42 -05:00
|
|
|
add_tests ();
|
2010-10-18 23:19:20 -07:00
|
|
|
moo_test_run_tests (tests, data_dir, opts);
|
2008-09-15 03:59:22 -05:00
|
|
|
|
2008-01-31 01:16:57 -06:00
|
|
|
moo_test_cleanup ();
|
2008-02-10 12:56:31 -06:00
|
|
|
|
2008-01-31 01:16:57 -06:00
|
|
|
return moo_test_get_result () ? 0 : 1;
|
2008-01-19 01:34:21 -06:00
|
|
|
}
|
2010-10-18 23:19:20 -07:00
|
|
|
|
|
|
|
static void
|
|
|
|
list_unit_tests (void)
|
|
|
|
{
|
2010-10-25 00:05:49 -07:00
|
|
|
unit_tests_main (MOO_TEST_LIST_ONLY, NULL, NULL);
|
2010-10-18 23:19:20 -07:00
|
|
|
}
|