From: <ik...@us...> - 2008-02-28 05:35:11
|
Revision: 1138 http://cutter.svn.sourceforge.net/cutter/?rev=1138&view=rev Author: ikezoe Date: 2008-02-27 21:35:10 -0800 (Wed, 27 Feb 2008) Log Message: ----------- * cutter/cut-test-case.c: Invoke initialize() and finalize() functions at the beggining and the ending of TestCase respectively. These are not barriered by setjmp() yet. Modified Paths: -------------- trunk/ChangeLog trunk/cutter/cut-test-case.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-02-28 05:26:27 UTC (rev 1137) +++ trunk/ChangeLog 2008-02-28 05:35:10 UTC (rev 1138) @@ -7,6 +7,9 @@ * cutter/cut-loader.c, test/test-cut-loader.c, test/loader_test_dir/dummy-test-functions.c: Load initialize() and finalize() symbols. + * cutter/cut-test-case.c: Invoke initialize() and finalize() functions + at the beggining and the ending of TestCase respectively. These are + not barriered by setjmp() yet. 2008-02-28 Kouhei Sutou <ko...@co...> Modified: trunk/cutter/cut-test-case.c =================================================================== --- trunk/cutter/cut-test-case.c 2008-02-28 05:26:27 UTC (rev 1137) +++ trunk/cutter/cut-test-case.c 2008-02-28 05:35:10 UTC (rev 1138) @@ -395,6 +395,7 @@ cut_test_case_run_tests (CutTestCase *test_case, CutRunner *runner, const GList *tests) { + CutTestCasePrivate *priv; const GList *list; gboolean all_success = TRUE; @@ -402,6 +403,12 @@ g_signal_emit_by_name(test_case, "ready", g_list_length((GList *)tests)); g_signal_emit_by_name(CUT_TEST(test_case), "start"); + priv = CUT_TEST_CASE_GET_PRIVATE(test_case); + + if (priv->initialize) { + priv->initialize(); + } + for (list = tests; list; list = g_list_next(list)) { if (!list->data) continue; @@ -426,6 +433,9 @@ g_object_unref(result); } + if (priv->finalize) { + priv->finalize(); + } g_signal_emit_by_name(CUT_TEST(test_case), "complete"); return all_success; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |