You can subscribe to this list here.
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(52) |
Nov
(902) |
Dec
(89) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
(10) |
Feb
(103) |
Mar
(216) |
Apr
(184) |
May
(435) |
Jun
(123) |
Jul
(145) |
Aug
(107) |
Sep
(53) |
Oct
(140) |
Nov
(59) |
Dec
(40) |
| 2009 |
Jan
(28) |
Feb
(39) |
Mar
(70) |
Apr
(35) |
May
(146) |
Jun
(23) |
Jul
(6) |
Aug
(110) |
Sep
(65) |
Oct
(111) |
Nov
(127) |
Dec
(1) |
| 2010 |
Jan
(12) |
Feb
(2) |
Mar
(56) |
Apr
(123) |
May
(13) |
Jun
(120) |
Jul
(42) |
Aug
(2) |
Sep
(23) |
Oct
(3) |
Nov
(10) |
Dec
(1) |
| 2011 |
Jan
(9) |
Feb
(99) |
Mar
(3) |
Apr
(1) |
May
(18) |
Jun
|
Jul
(43) |
Aug
(1) |
Sep
(1) |
Oct
(34) |
Nov
(7) |
Dec
(74) |
| 2012 |
Jan
(10) |
Feb
(10) |
Mar
(71) |
Apr
(1) |
May
(9) |
Jun
(8) |
Jul
(2) |
Aug
(97) |
Sep
(1) |
Oct
(16) |
Nov
(3) |
Dec
(33) |
| 2013 |
Jan
(26) |
Feb
(3) |
Mar
|
Apr
(4) |
May
(9) |
Jun
(2) |
Jul
(6) |
Aug
(2) |
Sep
|
Oct
|
Nov
(32) |
Dec
(2) |
| 2014 |
Jan
(38) |
Feb
(39) |
Mar
|
Apr
|
May
(11) |
Jun
(22) |
Jul
|
Aug
(3) |
Sep
(3) |
Oct
(7) |
Nov
|
Dec
|
| 2015 |
Jan
(3) |
Feb
(1) |
Mar
(12) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: HAYASHI K. <nul...@cl...> - 2014-02-03 07:43:39
|
HAYASHI Kentaro 2014-02-03 16:17:00 +0900 (Mon, 03 Feb 2014) New Revision: 07cbda4867697e17b7525e19625a8fba03a0b72b https://github.com/clear-code/cutter/commit/07cbda4867697e17b7525e19625a8fba03a0b72b Message: deb rpm: add 1.2.3 release entry Modified files: packages/debian/changelog packages/rpm/centos/cutter.spec.in Modified: packages/debian/changelog (+6 -0) =================================================================== --- packages/debian/changelog 2014-01-30 22:37:52 +0900 (6517f2c) +++ packages/debian/changelog 2014-02-03 16:17:00 +0900 (784ef62) @@ -1,3 +1,9 @@ +cutter (1.2.3-1) unstable; urgency=low + + * New upstream release. + + -- HAYASHI Kentaro <ha...@cl...> Sun, 09 Feb 2014 00:00:00 +0900 + cutter (1.2.2-1) unstable; urgency=low * New upstream release. Modified: packages/rpm/centos/cutter.spec.in (+4 -1) =================================================================== --- packages/rpm/centos/cutter.spec.in 2014-01-30 22:37:52 +0900 (53ce285) +++ packages/rpm/centos/cutter.spec.in 2014-02-03 16:17:00 +0900 (77ad3aa) @@ -1,7 +1,7 @@ Summary: A Unit Testing Framework for C Name: cutter Version: @VERSION@ -Release: 0%{?dist} +Release: 1%{?dist} License: LGPL3+ URL: http://cutter.sourceforge.net/ Group: Development/Tools @@ -49,6 +49,9 @@ rm -rf %{buildroot} %{_datadir}/locale/ %changelog +* Sun Feb 09 2014 HAYASHI Kentaro <ha...@cl...> - 1.2.3-1 +- new upstream release. + * Mon Oct 29 2012 HAYASHI Kentaro <ha...@cl...> - 1.2.2-0 - new upstream release. |
|
From: HAYASHI K. <nul...@cl...> - 2014-02-03 07:43:39
|
HAYASHI Kentaro 2014-02-03 16:40:18 +0900 (Mon, 03 Feb 2014) New Revision: bf9f428058c30b21f164f87cc89b304ef8a3c337 https://github.com/clear-code/cutter/commit/bf9f428058c30b21f164f87cc89b304ef8a3c337 Message: doc: add missing CFLAGS when compiling cutter-scan.c Without this change, make dist fails. Modified files: doc/reference/Makefile.am Modified: doc/reference/Makefile.am (+3 -0) =================================================================== --- doc/reference/Makefile.am 2014-02-03 16:18:31 +0900 (5e45111) +++ doc/reference/Makefile.am 2014-02-03 16:40:18 +0900 (0287ad6) @@ -14,6 +14,9 @@ SOURCE_DIR_OPTIONS= \ `test "$(top_builddir)" != "$(top_srcdir)" && \ echo --source-dir="$(top_builddir)/cutter"` +GTKDOC_CFLAGS = \ + $(GLIB_CFLAGS) + # Extra options to supply to gtkdoc-scan SCAN_OPTIONS = \ --deprecated-guards="CUTTER_DISABLE_DEPRECATED" \ |
|
From: Kouhei S. <nul...@cl...> - 2014-01-30 13:38:10
|
Kouhei Sutou 2014-01-30 22:37:52 +0900 (Thu, 30 Jan 2014) New Revision: 1535314c7ca833bef0fff976eb72273c887e5999 https://github.com/clear-code/cutter/commit/1535314c7ca833bef0fff976eb72273c887e5999 Message: test: remove needless code Modified files: test/cppcutter/test-cppcut-test.cpp Modified: test/cppcutter/test-cppcut-test.cpp (+0 -1) =================================================================== --- test/cppcutter/test-cppcut-test.cpp 2014-01-30 22:32:19 +0900 (2047b1d) +++ test/cppcutter/test-cppcut-test.cpp 2014-01-30 22:37:52 +0900 (1016720) @@ -164,7 +164,6 @@ namespace cppcut_test { struct { bool operator ()(void) { - stub_not_std_exception(); throw "exception on stacked jump buffer"; } } stub_throw; |
|
From: Kouhei S. <nul...@cl...> - 2014-01-30 13:32:38
|
Kouhei Sutou 2014-01-30 22:32:19 +0900 (Thu, 30 Jan 2014) New Revision: 847b2e2403592d9f74d88d2c1cade1b5e814ec0e https://github.com/clear-code/cutter/commit/847b2e2403592d9f74d88d2c1cade1b5e814ec0e Message: Revert adding cut_test_get_jump_buffer() It is a needless function. We can implement the same feature by cut_test_context_get_jump_buffer(). Modified files: cppcutter/cppcut-test-methods.cpp cutter/cut-test.c cutter/cut-test.h Modified: cppcutter/cppcut-test-methods.cpp (+5 -3) =================================================================== --- cppcutter/cppcut-test-methods.cpp 2014-01-30 22:28:39 +0900 (992e1f5) +++ cppcutter/cppcut-test-methods.cpp 2014-01-30 22:32:19 +0900 (d9a34af) @@ -47,12 +47,12 @@ struct CppCutTestTerminated { static const gchar *invoking_data_key = "cppcut-test-invoking"; static void -force_unwind_jump_buffers (CutTest *test) +force_unwind_jump_buffers (CutTest *test, jmp_buf *base_jump_buffer) { CutTestContext *test_context = cut_get_current_test_context(); while (cut_test_context_in_user_message_jump(test_context)) cut_test_context_finish_user_message_jump(test_context); - cut_test_context_set_jump_buffer(test_context, cut_test_get_jump_buffer(test)); + cut_test_context_set_jump_buffer(test_context, base_jump_buffer); } void @@ -84,7 +84,9 @@ cut::test::invoke (CutTestClass *cut_test_class, bool is_terminated = false; const gchar *terminate_message = NULL; gboolean invoking = TRUE; + jmp_buf *base_jump_buffer; + base_jump_buffer = cut_test_context_get_jump_buffer(test_context); g_object_set_data(G_OBJECT(test), invoking_data_key, &invoking); try { cut_test_class->invoke(test, test_context, run_context); @@ -109,7 +111,7 @@ cut::test::invoke (CutTestClass *cut_test_class, } if (terminate_message) { - force_unwind_jump_buffers(test); + force_unwind_jump_buffers(test, base_jump_buffer); cut_test_terminate(ERROR, terminate_message); } } Modified: cutter/cut-test.c (+0 -7) =================================================================== --- cutter/cut-test.c 2014-01-30 22:28:39 +0900 (4621bc4) +++ cutter/cut-test.c 2014-01-30 22:32:19 +0900 (d9ef5d9) @@ -551,13 +551,6 @@ cut_test_is_own_jump_buffer (CutTest *test, jmp_buf *jump_buffer) return priv->jump_buffer == jump_buffer; } -jmp_buf * -cut_test_get_jump_buffer (CutTest *test) -{ - CutTestPrivate *priv = CUT_TEST_GET_PRIVATE(test); - return priv->jump_buffer; -} - const gchar * cut_test_get_name (CutTest *test) { Modified: cutter/cut-test.h (+0 -1) =================================================================== --- cutter/cut-test.h 2014-01-30 22:28:39 +0900 (b1b6dc2) +++ cutter/cut-test.h 2014-01-30 22:32:19 +0900 (32f311a) @@ -118,7 +118,6 @@ void cut_test_long_jump (CutTest *test, gint value); gboolean cut_test_is_own_jump_buffer (CutTest *test, jmp_buf *jump_buffer); -jmp_buf *cut_test_get_jump_buffer (CutTest *test); const gchar *cut_test_get_name (CutTest *test); void cut_test_set_name (CutTest *test, |
|
From: Kazuhiro Y. <nul...@cl...> - 2014-01-30 13:28:57
|
Kazuhiro Yamato 2014-01-30 10:15:24 +0900 (Thu, 30 Jan 2014) New Revision: 4c7e91f3abd0d5fa1314f0dd712f4287502e6519 https://github.com/clear-code/cutter/commit/4c7e91f3abd0d5fa1314f0dd712f4287502e6519 Merged 2ea8341: Merge pull request #11 from kz0817/unwind-jump-buffers-on-exception Message: Unwind jump buffers to avoid an invalid memory access on an unhandled exception If jump buffers are stacked, the previous catch handler calls longjmp() with the top of the jump buffers. However, it is no longer valid, because it was on a stack unwound by the exception. This situation typically happens when an exception is thrown in cutter's assertion function. This patch forces to use the base jump buffer when an unhandled exception is caught. Modified files: cppcutter/cppcut-test-methods.cpp cutter/cut-test.c cutter/cut-test.h test/cppcutter/test-cppcut-test.cpp Modified: cppcutter/cppcut-test-methods.cpp (+10 -0) =================================================================== --- cppcutter/cppcut-test-methods.cpp 2014-01-27 21:39:02 +0900 (2f16b9f) +++ cppcutter/cppcut-test-methods.cpp 2014-01-30 10:15:24 +0900 (992e1f5) @@ -46,6 +46,15 @@ struct CppCutTestTerminated { static const gchar *invoking_data_key = "cppcut-test-invoking"; +static void +force_unwind_jump_buffers (CutTest *test) +{ + CutTestContext *test_context = cut_get_current_test_context(); + while (cut_test_context_in_user_message_jump(test_context)) + cut_test_context_finish_user_message_jump(test_context); + cut_test_context_set_jump_buffer(test_context, cut_test_get_jump_buffer(test)); +} + void cut::test::long_jump (CutTestClass *cut_test_class, CutTest *test, @@ -100,6 +109,7 @@ cut::test::invoke (CutTestClass *cut_test_class, } if (terminate_message) { + force_unwind_jump_buffers(test); cut_test_terminate(ERROR, terminate_message); } } Modified: cutter/cut-test.c (+7 -0) =================================================================== --- cutter/cut-test.c 2014-01-27 21:39:02 +0900 (d9ef5d9) +++ cutter/cut-test.c 2014-01-30 10:15:24 +0900 (4621bc4) @@ -551,6 +551,13 @@ cut_test_is_own_jump_buffer (CutTest *test, jmp_buf *jump_buffer) return priv->jump_buffer == jump_buffer; } +jmp_buf * +cut_test_get_jump_buffer (CutTest *test) +{ + CutTestPrivate *priv = CUT_TEST_GET_PRIVATE(test); + return priv->jump_buffer; +} + const gchar * cut_test_get_name (CutTest *test) { Modified: cutter/cut-test.h (+1 -0) =================================================================== --- cutter/cut-test.h 2014-01-27 21:39:02 +0900 (32f311a) +++ cutter/cut-test.h 2014-01-30 10:15:24 +0900 (b1b6dc2) @@ -118,6 +118,7 @@ void cut_test_long_jump (CutTest *test, gint value); gboolean cut_test_is_own_jump_buffer (CutTest *test, jmp_buf *jump_buffer); +jmp_buf *cut_test_get_jump_buffer (CutTest *test); const gchar *cut_test_get_name (CutTest *test); void cut_test_set_name (CutTest *test, Modified: test/cppcutter/test-cppcut-test.cpp (+43 -0) =================================================================== --- test/cppcutter/test-cppcut-test.cpp 2014-01-27 21:39:02 +0900 (3862137) +++ test/cppcutter/test-cppcut-test.cpp 2014-01-30 10:15:24 +0900 (2047b1d) @@ -27,6 +27,14 @@ #include "../lib/cuttest-assertions.h" +#define MARK_FAIL(assertion) do \ +{ \ + fail_line = __LINE__; \ + assertion; \ +} while (0) + +#define FAIL_LOCATION (cut_take_printf("%s:%d", __FILE__, fail_line)) + namespace cppcut_test { CppCutTest *test; @@ -34,6 +42,7 @@ namespace cppcut_test CutTestContext *test_context; CutTestResult *test_result; gint n_destructor_calls; + gint fail_line; static gboolean run (void) @@ -61,6 +70,7 @@ namespace cppcut_test test_result = NULL; n_destructor_calls = 0; + fail_line = 0; } void @@ -149,6 +159,39 @@ namespace cppcut_test NULL); } + static void + stub_exception_on_stacked_jump_buffer (void) + { + struct { + bool operator ()(void) { + stub_not_std_exception(); + throw "exception on stacked jump buffer"; + } + } stub_throw; + MARK_FAIL(cppcut_assert_equal(true, stub_throw())); + } + + void + test_exception_on_stacked_jump_buffer (void) + { + test = cppcut_test_new("exception on stacked jump buffer test", + stub_exception_on_stacked_jump_buffer); + cut_assert_not_null(test); + + cut_assert_false(run()); + cut_assert_test_result_summary(run_context, 1, 0, 0, 0, 1, 0, 0, 0); + const gchar *system_message = + "Unhandled C++ non-standard exception is thrown"; + cut_assert_test_result(run_context, 0, CUT_TEST_RESULT_ERROR, + "exception on stacked jump buffer test", + NULL, + system_message, + NULL, NULL, + FAIL_LOCATION, + "void cppcut_test::stub_exception_on_stacked_jump_buffer()", + NULL); + } + class DestructorCallCounter { public: |
|
From: Kouhei S. <nul...@cl...> - 2014-01-30 13:28:55
|
Kouhei Sutou 2014-01-30 22:28:39 +0900 (Thu, 30 Jan 2014) New Revision: 2ea8341b9da10b70ce4ea60bc73326e5326775d3 https://github.com/clear-code/cutter/commit/2ea8341b9da10b70ce4ea60bc73326e5326775d3 Message: Merge pull request #11 from kz0817/unwind-jump-buffers-on-exception Unwind jump buffers to avoid an invalid memory access on an unhandled exception Patch by Kazuhiro Yamato. Thanks!!! |
|
From: Kouhei S. <nul...@cl...> - 2014-01-27 12:39:24
|
Kouhei Sutou 2014-01-27 21:39:02 +0900 (Mon, 27 Jan 2014) New Revision: 4650be1e74a1a3d4763f802cd6012ecb8edec864 https://github.com/clear-code/cutter/commit/4650be1e74a1a3d4763f802cd6012ecb8edec864 Message: Remove a needless space Modified files: module/loader-customizer/cut-cpp-integration-loader-customizer-factory.c Modified: module/loader-customizer/cut-cpp-integration-loader-customizer-factory.c (+1 -1) =================================================================== --- module/loader-customizer/cut-cpp-integration-loader-customizer-factory.c 2014-01-27 21:33:53 +0900 (cc91635) +++ module/loader-customizer/cut-cpp-integration-loader-customizer-factory.c 2014-01-27 21:39:02 +0900 (82f0bb3) @@ -75,7 +75,7 @@ class_init (CutModuleFactoryClass *klass) parent_class = g_type_class_peek_parent(klass); - factory_class = CUT_MODULE_FACTORY_CLASS(klass); + factory_class = CUT_MODULE_FACTORY_CLASS(klass); factory_class->create = create; } |
|
From: Kouhei S. <nul...@cl...> - 2014-01-27 12:34:14
|
Kouhei Sutou 2014-01-27 21:33:53 +0900 (Mon, 27 Jan 2014) New Revision: ad3e83bae572ca683a78e89ad1a437cb805bdd22 https://github.com/clear-code/cutter/commit/ad3e83bae572ca683a78e89ad1a437cb805bdd22 Message: Use more meaningful module name for improving C++ integration exception -> cpp-integration The module just processes only C++ exception but it processes stack unwinding for C++ too. So "exception" is misleading name. Modified files: module/loader-customizer/Makefile.am Renamed files: module/loader-customizer/cut-cpp-integration-loader-customizer-factory.c (from module/loader-customizer/cut-exception-loader-customizer-factory.c) module/loader-customizer/cut-cpp-integration-loader-customizer.c (from module/loader-customizer/cut-exception-loader-customizer.c) Modified: module/loader-customizer/Makefile.am (+6 -6) =================================================================== --- module/loader-customizer/Makefile.am 2014-01-26 20:57:02 +0900 (575e9ea) +++ module/loader-customizer/Makefile.am 2014-01-27 21:33:53 +0900 (2755fec) @@ -21,12 +21,12 @@ LIBS = \ $(top_builddir)/cppcutter/libcppcutter.la loader_customizer_module_LTLIBRARIES = \ - exception.la + cpp-integration.la loader_customizer_factory_module_LTLIBRARIES = \ - exception-factory.la + cpp-integration-factory.la -exception_la_SOURCES = \ - cut-exception-loader-customizer.c +cpp_integration_la_SOURCES = \ + cut-cpp-integration-loader-customizer.c -exception_factory_la_SOURCES = \ - cut-exception-loader-customizer-factory.c +cpp_integration_factory_la_SOURCES = \ + cut-cpp-integration-loader-customizer-factory.c Renamed: module/loader-customizer/cut-cpp-integration-loader-customizer-factory.c (+29 -29) 57% =================================================================== --- module/loader-customizer/cut-exception-loader-customizer-factory.c 2014-01-26 20:57:02 +0900 (834062b) +++ module/loader-customizer/cut-cpp-integration-loader-customizer-factory.c 2014-01-27 21:33:53 +0900 (cc91635) @@ -29,41 +29,41 @@ #include <cutter/cut-module-factory.h> #include <cutter/cut-loader-customizer.h> -#define CUT_TYPE_EXCEPTION_LOADER_CUSTOMIZER_FACTORY \ - cut_type_exception_loader_customizer_factory -#define CUT_EXCEPTION_LOADER_CUSTOMIZER_FACTORY(obj) \ +#define CUT_TYPE_CPP_INTEGRATION_LOADER_CUSTOMIZER_FACTORY \ + cut_type_cpp_integration_loader_customizer_factory +#define CUT_CPP_INTEGRATION_LOADER_CUSTOMIZER_FACTORY(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), \ - CUT_TYPE_EXCEPTION_LOADER_CUSTOMIZER_FACTORY, \ - CutExceptionLoaderCustomizerFactory)) -#define CUT_EXCEPTION_LOADER_CUSTOMIZER_FACTORY_CLASS(klass) \ + CUT_TYPE_CPP_INTEGRATION_LOADER_CUSTOMIZER_FACTORY, \ + CutCppIntegrationLoaderCustomizerFactory)) +#define CUT_CPP_INTEGRATION_LOADER_CUSTOMIZER_FACTORY_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), \ - CUT_TYPE_EXCEPTION_LOADER_CUSTOMIZER_FACTORY, \ - CutExceptionLoaderCustomizerFactoryClass)) -#define CUT_IS_EXCEPTION_LOADER_CUSTOMIZER_FACTORY(obj) \ + CUT_TYPE_CPP_INTEGRATION_LOADER_CUSTOMIZER_FACTORY, \ + CutCppIntegrationLoaderCustomizerFactoryClass)) +#define CUT_IS_CPP_INTEGRATION_LOADER_CUSTOMIZER_FACTORY(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), \ - CUT_TYPE_EXCEPTION_LOADER_CUSTOMIZER_FACTORY)) -#define CUT_IS_EXCEPTION_LOADER_CUSTOMIZER_FACTORY_CLASS(klass) \ + CUT_TYPE_CPP_INTEGRATION_LOADER_CUSTOMIZER_FACTORY)) +#define CUT_IS_CPP_INTEGRATION_LOADER_CUSTOMIZER_FACTORY_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), \ - CUT_TYPE_EXCEPTION_LOADER_CUSTOMIZER_FACTORY)) -#define CUT_EXCEPTION_LOADER_CUSTOMIZER_FACTORY_GET_CLASS(obj) \ + CUT_TYPE_CPP_INTEGRATION_LOADER_CUSTOMIZER_FACTORY)) +#define CUT_CPP_INTEGRATION_LOADER_CUSTOMIZER_FACTORY_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS((obj), \ - CUT_TYPE_EXCEPTION_LOADER_CUSTOMIZER_FACTORY, \ - CutExceptionLoaderCustomizerFactoryClass)) + CUT_TYPE_CPP_INTEGRATION_LOADER_CUSTOMIZER_FACTORY, \ + CutCppIntegrationLoaderCustomizerFactoryClass)) -typedef struct _CutExceptionLoaderCustomizerFactory CutExceptionLoaderCustomizerFactory; -typedef struct _CutExceptionLoaderCustomizerFactoryClass CutExceptionLoaderCustomizerFactoryClass; +typedef struct _CutCppIntegrationLoaderCustomizerFactory CutCppIntegrationLoaderCustomizerFactory; +typedef struct _CutCppIntegrationLoaderCustomizerFactoryClass CutCppIntegrationLoaderCustomizerFactoryClass; -struct _CutExceptionLoaderCustomizerFactory +struct _CutCppIntegrationLoaderCustomizerFactory { CutModuleFactory object; }; -struct _CutExceptionLoaderCustomizerFactoryClass +struct _CutCppIntegrationLoaderCustomizerFactoryClass { CutModuleFactoryClass parent_class; }; -static GType cut_type_exception_loader_customizer_factory = 0; +static GType cut_type_cpp_integration_loader_customizer_factory = 0; static CutModuleFactoryClass *parent_class; static GObject *create (CutModuleFactory *factory); @@ -81,7 +81,7 @@ class_init (CutModuleFactoryClass *klass) } static void -init (CutExceptionLoaderCustomizerFactory *console) +init (CutCppIntegrationLoaderCustomizerFactory *console) { } @@ -89,21 +89,21 @@ static void register_type (GTypeModule *type_module) { static const GTypeInfo info = { - sizeof(CutExceptionLoaderCustomizerFactoryClass), + sizeof(CutCppIntegrationLoaderCustomizerFactoryClass), (GBaseInitFunc)NULL, (GBaseFinalizeFunc)NULL, (GClassInitFunc)class_init, NULL, /* class_finalize */ NULL, /* class_data */ - sizeof(CutExceptionLoaderCustomizerFactory), + sizeof(CutCppIntegrationLoaderCustomizerFactory), 0, (GInstanceInitFunc)init, }; - cut_type_exception_loader_customizer_factory = + cut_type_cpp_integration_loader_customizer_factory = g_type_module_register_type(type_module, CUT_TYPE_MODULE_FACTORY, - "CutExceptionLoaderCustomizerFactory", + "CutCppIntegrationLoaderCustomizerFactory", &info, 0); } @@ -113,10 +113,10 @@ CUT_MODULE_IMPL_INIT (GTypeModule *type_module) GList *registered_types = NULL; register_type(type_module); - if (cut_type_exception_loader_customizer_factory) { + if (cut_type_cpp_integration_loader_customizer_factory) { registered_types = g_list_prepend(registered_types, - (gchar *)g_type_name(cut_type_exception_loader_customizer_factory)); + (gchar *)g_type_name(cut_type_cpp_integration_loader_customizer_factory)); } return registered_types; @@ -130,13 +130,13 @@ CUT_MODULE_IMPL_EXIT (void) G_MODULE_EXPORT GObject * CUT_MODULE_IMPL_INSTANTIATE (const gchar *first_property, va_list var_args) { - return g_object_new_valist(CUT_TYPE_EXCEPTION_LOADER_CUSTOMIZER_FACTORY, first_property, var_args); + return g_object_new_valist(CUT_TYPE_CPP_INTEGRATION_LOADER_CUSTOMIZER_FACTORY, first_property, var_args); } GObject * create (CutModuleFactory *factory) { - return G_OBJECT(cut_loader_customizer_new("exception", + return G_OBJECT(cut_loader_customizer_new("cpp-integration", NULL)); } Renamed: module/loader-customizer/cut-cpp-integration-loader-customizer.c (+29 -29) 67% =================================================================== --- module/loader-customizer/cut-exception-loader-customizer.c 2014-01-26 20:57:02 +0900 (ed01c30) +++ module/loader-customizer/cut-cpp-integration-loader-customizer.c 2014-01-27 21:33:53 +0900 (f97deb6) @@ -30,48 +30,48 @@ #include <cppcutter/cppcut-test.h> #include <cppcutter/cppcut-test-iterator.h> -#define CUT_TYPE_EXCEPTION_LOADER_CUSTOMIZER \ - cut_type_exception_loader_customizer -#define CUT_EXCEPTION_LOADER_CUSTOMIZER(obj) \ +#define CUT_TYPE_CPP_INTEGRATION_LOADER_CUSTOMIZER \ + cut_type_cpp_integration_loader_customizer +#define CUT_CPP_INTEGRATION_LOADER_CUSTOMIZER(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), \ - CUT_TYPE_EXCEPTION_LOADER_CUSTOMIZER, \ - CutExceptionLoaderCustomizer)) -#define CUT_EXCEPTION_LOADER_CUSTOMIZER_CLASS(klass) \ + CUT_TYPE_CPP_INTEGRATION_LOADER_CUSTOMIZER, \ + CutCppIntegrationLoaderCustomizer)) +#define CUT_CPP_INTEGRATION_LOADER_CUSTOMIZER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), \ - CUT_TYPE_EXCEPTION_LOADER_CUSTOMIZER, \ - CutExceptionLoaderCustomizerClass)) -#define CUT_IS_EXCEPTION_LOADER_CUSTOMIZER(obj) \ + CUT_TYPE_CPP_INTEGRATION_LOADER_CUSTOMIZER, \ + CutCppIntegrationLoaderCustomizerClass)) +#define CUT_IS_CPP_INTEGRATION_LOADER_CUSTOMIZER(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), \ - CUT_TYPE_EXCEPTION_LOADER_CUSTOMIZER)) -#define CUT_IS_EXCEPTION_LOADER_CUSTOMIZER_CLASS(klass) \ + CUT_TYPE_CPP_INTEGRATION_LOADER_CUSTOMIZER)) +#define CUT_IS_CPP_INTEGRATION_LOADER_CUSTOMIZER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), \ - CUT_TYPE_EXCEPTION_LOADER_CUSTOMIZER)) -#define CUT_EXCEPTION_LOADER_CUSTOMIZER_GET_CLASS(obj) \ + CUT_TYPE_CPP_INTEGRATION_LOADER_CUSTOMIZER)) +#define CUT_CPP_INTEGRATION_LOADER_CUSTOMIZER_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS((obj), \ - CUT_TYPE_EXCEPTION_LOADER_CUSTOMIZER, \ - CutExceptionLoaderCustomizerClass)) + CUT_TYPE_CPP_INTEGRATION_LOADER_CUSTOMIZER, \ + CutCppIntegrationLoaderCustomizerClass)) -typedef struct _CutExceptionLoaderCustomizer CutExceptionLoaderCustomizer; -typedef struct _CutExceptionLoaderCustomizerClass CutExceptionLoaderCustomizerClass; +typedef struct _CutCppIntegrationLoaderCustomizer CutCppIntegrationLoaderCustomizer; +typedef struct _CutCppIntegrationLoaderCustomizerClass CutCppIntegrationLoaderCustomizerClass; -struct _CutExceptionLoaderCustomizer +struct _CutCppIntegrationLoaderCustomizer { CutLoaderCustomizer parent; }; -struct _CutExceptionLoaderCustomizerClass +struct _CutCppIntegrationLoaderCustomizerClass { CutLoaderCustomizerClass parent_class; }; -static GType cut_type_exception_loader_customizer = 0; +static GType cut_type_cpp_integration_loader_customizer = 0; static GObjectClass *parent_class; static void customize (CutLoaderCustomizer *customizer, CutLoader *loader); static void -class_init (CutExceptionLoaderCustomizerClass *klass) +class_init (CutCppIntegrationLoaderCustomizerClass *klass) { CutLoaderCustomizerClass *loader_customizer_class; @@ -82,7 +82,7 @@ class_init (CutExceptionLoaderCustomizerClass *klass) } static void -init (CutExceptionLoaderCustomizer *customizer) +init (CutCppIntegrationLoaderCustomizer *customizer) { } @@ -90,21 +90,21 @@ static void register_type (GTypeModule *type_module) { static const GTypeInfo info = { - sizeof(CutExceptionLoaderCustomizerClass), + sizeof(CutCppIntegrationLoaderCustomizerClass), (GBaseInitFunc)NULL, (GBaseFinalizeFunc)NULL, (GClassInitFunc)class_init, NULL, /* class_finalize */ NULL, /* class_data */ - sizeof(CutExceptionLoaderCustomizer), + sizeof(CutCppIntegrationLoaderCustomizer), 0, (GInstanceInitFunc)init, }; - cut_type_exception_loader_customizer = + cut_type_cpp_integration_loader_customizer = g_type_module_register_type(type_module, CUT_TYPE_LOADER_CUSTOMIZER, - "CutExceptionLoaderCustomizer", + "CutCppIntegrationLoaderCustomizer", &info, 0); } @@ -114,10 +114,10 @@ CUT_MODULE_IMPL_INIT (GTypeModule *type_module) GList *registered_types = NULL; register_type(type_module); - if (cut_type_exception_loader_customizer) { + if (cut_type_cpp_integration_loader_customizer) { registered_types = g_list_prepend(registered_types, - (gchar *)g_type_name(cut_type_exception_loader_customizer)); + (gchar *)g_type_name(cut_type_cpp_integration_loader_customizer)); } return registered_types; @@ -131,7 +131,7 @@ CUT_MODULE_IMPL_EXIT (void) G_MODULE_EXPORT GObject * CUT_MODULE_IMPL_INSTANTIATE (const gchar *first_property, va_list var_args) { - return g_object_new_valist(CUT_TYPE_EXCEPTION_LOADER_CUSTOMIZER, + return g_object_new_valist(CUT_TYPE_CPP_INTEGRATION_LOADER_CUSTOMIZER, first_property, var_args); } |
|
From: Kouhei S. <nul...@cl...> - 2014-01-26 11:57:21
|
Kouhei Sutou 2014-01-26 20:57:02 +0900 (Sun, 26 Jan 2014) New Revision: 9a8621b3d309162035a3dde0ef07bcab2bf48910 https://github.com/clear-code/cutter/commit/9a8621b3d309162035a3dde0ef07bcab2bf48910 Message: Follow file name to reflect file content cppcut-test-invoke -> cppcut-test-methods ^^^^^^^ Modified files: cppcutter/Makefile.am cppcutter/cppcut-iterated-test.cpp cppcutter/cppcut-test.cpp Renamed files: cppcutter/cppcut-test-methods.cpp (from cppcutter/cppcut-test-invoke.cpp) cppcutter/cppcut-test-methods.h (from cppcutter/cppcut-test-invoke.h) Modified: cppcutter/Makefile.am (+2 -2) =================================================================== --- cppcutter/Makefile.am 2014-01-26 20:51:53 +0900 (8af4b32) +++ cppcutter/Makefile.am 2014-01-26 20:57:02 +0900 (ff57884) @@ -22,7 +22,7 @@ cppcutter_private_headers = \ cppcut-test.h \ cppcut-test-iterator.h \ cppcut-iterated-test.h \ - cppcut-test-invoke.h + cppcut-test-methods.h pkginclude_HEADERS = \ cppcutter.h @@ -37,7 +37,7 @@ libcppcutter_sources = \ cppcut-test.cpp \ cppcut-test-iterator.cpp \ cppcut-iterated-test.cpp \ - cppcut-test-invoke.cpp + cppcut-test-methods.cpp libcppcutter_la_SOURCES = \ $(cppcutter_public_headers) \ Modified: cppcutter/cppcut-iterated-test.cpp (+1 -1) =================================================================== --- cppcutter/cppcut-iterated-test.cpp 2014-01-26 20:51:53 +0900 (96bff24) +++ cppcutter/cppcut-iterated-test.cpp 2014-01-26 20:57:02 +0900 (bbb33ae) @@ -22,7 +22,7 @@ #endif #include "cppcut-iterated-test.h" -#include "cppcut-test-invoke.h" +#include "cppcut-test-methods.h" G_BEGIN_DECLS Renamed: cppcutter/cppcut-test-methods.cpp (+1 -1) 99% =================================================================== --- cppcutter/cppcut-test-invoke.cpp 2014-01-26 20:51:53 +0900 (c6414bd) +++ cppcutter/cppcut-test-methods.cpp 2014-01-26 20:57:02 +0900 (2f16b9f) @@ -25,7 +25,7 @@ #include <exception> #include <typeinfo> -#include "cppcut-test-invoke.h" +#include "cppcut-test-methods.h" #include <cutter.h> Renamed: cppcutter/cppcut-test-methods.h (+3 -3) 92% =================================================================== --- cppcutter/cppcut-test-invoke.h 2014-01-26 20:51:53 +0900 (78ad069) +++ cppcutter/cppcut-test-methods.h 2014-01-26 20:57:02 +0900 (60facf6) @@ -17,8 +17,8 @@ * */ -#ifndef __CPPCUT_TEST_INVOKE_H__ -#define __CPPCUT_TEST_INVOKE_H__ +#ifndef __CPPCUT_TEST_METHODS_H__ +#define __CPPCUT_TEST_METHODS_H__ #include <cutter/cut-test.h> @@ -37,7 +37,7 @@ namespace cut } } -#endif /* __CPPCUT_TEST_INVOKE_H__ */ +#endif /* __CPPCUT_TEST_METHODS_H__ */ /* vi:ts=4:nowrap:ai:expandtab:sw=4 Modified: cppcutter/cppcut-test.cpp (+1 -1) =================================================================== --- cppcutter/cppcut-test.cpp 2014-01-26 20:51:53 +0900 (fce833d) +++ cppcutter/cppcut-test.cpp 2014-01-26 20:57:02 +0900 (46477c0) @@ -22,7 +22,7 @@ #endif #include "cppcut-test.h" -#include "cppcut-test-invoke.h" +#include "cppcut-test-methods.h" #include <cutter.h> |
|
From: Kouhei S. <nul...@cl...> - 2014-01-26 11:52:18
|
Kouhei Sutou 2014-01-26 20:51:53 +0900 (Sun, 26 Jan 2014) New Revision: 165ef6a08426e637764164e2bf87c46ceb1bfafb https://github.com/clear-code/cutter/commit/165ef6a08426e637764164e2bf87c46ceb1bfafb Message: c++: support calling destructor on stack when an assertion is failed GitHub: fix #10 This change is based on patch by Kazuhiro Yamato. Thanks!!! Modified files: cppcutter/cppcut-iterated-test.cpp cppcutter/cppcut-test-invoke.cpp cppcutter/cppcut-test-invoke.h cppcutter/cppcut-test.cpp cutter/cut-test-context.c cutter/cut-test.c cutter/cut-test.h test/cppcutter/test-cppcut-iterated-test.cpp test/cppcutter/test-cppcut-test.cpp Modified: cppcutter/cppcut-iterated-test.cpp (+14 -1) =================================================================== --- cppcutter/cppcut-iterated-test.cpp 2014-01-26 19:36:49 +0900 (fbcf336) +++ cppcutter/cppcut-iterated-test.cpp 2014-01-26 20:51:53 +0900 (96bff24) @@ -28,6 +28,9 @@ G_BEGIN_DECLS G_DEFINE_TYPE(CppCutIteratedTest, cppcut_iterated_test, CUT_TYPE_ITERATED_TEST) +static void long_jump (CutTest *test, + jmp_buf *jump_buffer, + gint value); static void invoke (CutTest *test, CutTestContext *test_context, CutRunContext *run_context); @@ -39,7 +42,8 @@ cppcut_iterated_test_class_init (CppCutIteratedTestClass *klass) cut_test_class = CUT_TEST_CLASS(klass); - cut_test_class->invoke = invoke; + cut_test_class->long_jump = long_jump; + cut_test_class->invoke = invoke; } static void @@ -64,6 +68,15 @@ cppcut_iterated_test_new (const gchar *name, } static void +long_jump (CutTest *test, jmp_buf *jump_buffer, gint value) +{ + CutTestClass *cut_test_class; + + cut_test_class = CUT_TEST_CLASS(cppcut_iterated_test_parent_class); + cut::test::long_jump(cut_test_class, test, jump_buffer, value); +} + +static void invoke (CutTest *test, CutTestContext *test_context, CutRunContext *run_context) { CutTestClass *cut_test_class; Modified: cppcutter/cppcut-test-invoke.cpp (+62 -9) =================================================================== --- cppcutter/cppcut-test-invoke.cpp 2014-01-26 19:36:49 +0900 (0cc04ed) +++ cppcutter/cppcut-test-invoke.cpp 2014-01-26 20:51:53 +0900 (c6414bd) @@ -29,25 +29,78 @@ #include <cutter.h> +struct LongJumpArguments { + jmp_buf *jump_buffer; + gint value; +}; + +struct CppCutTestTerminated { + LongJumpArguments long_jump_arguments; + + CppCutTestTerminated (jmp_buf *jump_buffer, gint value) + { + long_jump_arguments.jump_buffer = jump_buffer; + long_jump_arguments.value = value; + } +}; + +static const gchar *invoking_data_key = "cppcut-test-invoking"; + +void +cut::test::long_jump (CutTestClass *cut_test_class, + CutTest *test, + jmp_buf *jump_buffer, + gint value) +{ + gpointer invoking_data; + gboolean *invoking; + + invoking_data = g_object_get_data(G_OBJECT(test), invoking_data_key); + invoking = static_cast<gboolean *>(invoking_data); + if (invoking && *invoking && + cut_test_is_own_jump_buffer(test, jump_buffer)) { + throw CppCutTestTerminated(jump_buffer, value); + } else { + cut_test_class->long_jump(test, jump_buffer, value); + } +} + void cut::test::invoke (CutTestClass *cut_test_class, CutTest *test, CutTestContext *test_context, CutRunContext *run_context) { + LongJumpArguments long_jump_arguments; + bool is_terminated = false; + const gchar *terminate_message = NULL; + gboolean invoking = TRUE; + + g_object_set_data(G_OBJECT(test), invoking_data_key, &invoking); try { cut_test_class->invoke(test, test_context, run_context); + } catch (const CppCutTestTerminated &terminated) { + is_terminated = true; + long_jump_arguments = terminated.long_jump_arguments; } catch (const std::exception &exception) { - const gchar *message; - message = cut_take_printf("Unhandled C++ standard exception is thrown: " - "<%s>: %s", - typeid(exception).name(), - exception.what()); - cut_test_terminate(ERROR, message); + terminate_message = + cut_take_printf("Unhandled C++ standard exception is thrown: " + "<%s>: %s", + typeid(exception).name(), + exception.what()); } catch (...) { - const gchar *message; - message = "Unhandled C++ non-standard exception is thrown"; - cut_test_terminate(ERROR, message); + terminate_message = "Unhandled C++ non-standard exception is thrown"; + } + g_object_steal_data(G_OBJECT(test), invoking_data_key); + + if (is_terminated) { + cut_test_class->long_jump(test, + long_jump_arguments.jump_buffer, + long_jump_arguments.value); + } + + if (terminate_message) { + cut_test_terminate(ERROR, terminate_message); } } Modified: cppcutter/cppcut-test-invoke.h (+8 -4) =================================================================== --- cppcutter/cppcut-test-invoke.h 2014-01-26 19:36:49 +0900 (35d5cf0) +++ cppcutter/cppcut-test-invoke.h 2014-01-26 20:51:53 +0900 (78ad069) @@ -26,10 +26,14 @@ namespace cut { namespace test { - void invoke (CutTestClass *cut_test_class, - CutTest *test, - CutTestContext *test_context, - CutRunContext *run_context); + void long_jump (CutTestClass *cut_test_class, + CutTest *test, + jmp_buf *jump_buffer, + gint value); + void invoke (CutTestClass *cut_test_class, + CutTest *test, + CutTestContext *test_context, + CutRunContext *run_context); } } Modified: cppcutter/cppcut-test.cpp (+13 -1) =================================================================== --- cppcutter/cppcut-test.cpp 2014-01-26 19:36:49 +0900 (f13d33a) +++ cppcutter/cppcut-test.cpp 2014-01-26 20:51:53 +0900 (fce833d) @@ -30,6 +30,9 @@ G_BEGIN_DECLS G_DEFINE_TYPE(CppCutTest, cppcut_test, CUT_TYPE_TEST) +static void long_jump (CutTest *test, + jmp_buf *jump_buffer, + gint value); static void invoke (CutTest *test, CutTestContext *test_context, CutRunContext *run_context); @@ -41,7 +44,8 @@ cppcut_test_class_init (CppCutTestClass *klass) cut_test_class = CUT_TEST_CLASS(klass); - cut_test_class->invoke = invoke; + cut_test_class->long_jump = long_jump; + cut_test_class->invoke = invoke; } static void @@ -63,6 +67,14 @@ cppcut_test_new (const gchar *name, CutTestFunction function) } static void +long_jump (CutTest *test, jmp_buf *jump_buffer, gint value) +{ + CutTestClass *cut_test_class = CUT_TEST_CLASS(cppcut_test_parent_class); + + cut::test::long_jump(cut_test_class, test, jump_buffer, value); +} + +static void invoke (CutTest *test, CutTestContext *test_context, CutRunContext *run_context) { CutTestClass *cut_test_class = CUT_TEST_CLASS(cppcut_test_parent_class); Modified: cutter/cut-test-context.c (+7 -1) =================================================================== --- cutter/cut-test-context.c 2014-01-26 19:36:49 +0900 (d06200c) +++ cutter/cut-test-context.c 2014-01-26 20:51:53 +0900 (5a25baa) @@ -855,7 +855,13 @@ cut_test_context_long_jump (CutTestContext *context) } if (cut_test_context_in_user_message_jump(context) || same_thread_p) { - longjmp(*(priv->jump_buffer), CUT_SIGNAL_EXPLICIT_JUMP); + if (priv->test) { + cut_test_long_jump(priv->test, + priv->jump_buffer, + CUT_SIGNAL_EXPLICIT_JUMP); + } else { + longjmp(*(priv->jump_buffer), CUT_SIGNAL_EXPLICIT_JUMP); + } } else { if (priv->parent && cut_test_context_is_failed(context)) { cut_test_context_set_failed(priv->parent, TRUE); Modified: cutter/cut-test.c (+34 -1) =================================================================== --- cutter/cut-test.c 2014-01-26 19:36:49 +0900 (a8468da) +++ cutter/cut-test.c 2014-01-26 20:51:53 +0900 (d9ef5d9) @@ -1,6 +1,7 @@ /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * Copyright (C) 2007-2014 Kouhei Sutou <ko...@cl...> + * Copyright (C) 2014 Kazuhiro Yamato <kz...@gm...> * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -54,6 +55,7 @@ struct _CutTestPrivate gdouble elapsed; GHashTable *attributes; gchar *base_directory; + jmp_buf *jump_buffer; }; enum @@ -101,6 +103,9 @@ static void set_elapsed (CutTest *test, gdouble elapsed); static gboolean run (CutTest *test, CutTestContext *test_context, CutRunContext *run_context); +static void long_jump (CutTest *test, + jmp_buf *jump_buffer, + gint value); static gboolean is_available (CutTest *test, CutTestContext *test_context, CutRunContext *run_context); @@ -128,6 +133,7 @@ cut_test_class_init (CutTestClass *klass) klass->get_elapsed = get_elapsed; klass->set_elapsed = set_elapsed; klass->run = run; + klass->long_jump = long_jump; klass->is_available = is_available; klass->invoke = invoke; klass->emit_result_signal = emit_result_signal; @@ -274,6 +280,7 @@ cut_test_init (CutTest *test) priv->elapsed = -1.0; priv->attributes = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free); + priv->jump_buffer = NULL; } static void @@ -440,8 +447,12 @@ run (CutTest *test, CutTestContext *test_context, CutRunContext *run_context) priv = CUT_TEST_GET_PRIVATE(test); klass = CUT_TEST_GET_CLASS(test); - if (!klass->is_available(test, test_context, run_context)) + priv->jump_buffer = &jump_buffer; + + if (!klass->is_available(test, test_context, run_context)) { + priv->jump_buffer = NULL; return FALSE; + } test_case = cut_test_context_get_test_case(test_context); test_iterator = cut_test_context_get_test_iterator(test_context); @@ -508,9 +519,17 @@ run (CutTest *test, CutTestContext *test_context, CutRunContext *run_context) g_signal_emit_by_name(test, "complete", test_context, success); + priv->jump_buffer = NULL; + return success; } +static void +long_jump (CutTest *test, jmp_buf *jump_buffer, gint value) +{ + longjmp(*jump_buffer, value); +} + gboolean cut_test_run (CutTest *test, CutTestContext *test_context, CutRunContext *run_context) @@ -518,6 +537,20 @@ cut_test_run (CutTest *test, CutTestContext *test_context, return CUT_TEST_GET_CLASS(test)->run(test, test_context, run_context); } +void +cut_test_long_jump (CutTest *test, jmp_buf *jump_buffer, gint value) +{ + return CUT_TEST_GET_CLASS(test)->long_jump(test, jump_buffer, value); +} + +gboolean +cut_test_is_own_jump_buffer (CutTest *test, jmp_buf *jump_buffer) +{ + CutTestPrivate *priv = CUT_TEST_GET_PRIVATE(test); + + return priv->jump_buffer == jump_buffer; +} + const gchar * cut_test_get_name (CutTest *test) { Modified: cutter/cut-test.h (+12 -1) =================================================================== --- cutter/cut-test.h 2014-01-26 19:36:49 +0900 (cda73ef) +++ cutter/cut-test.h 2014-01-26 20:51:53 +0900 (32f311a) @@ -1,6 +1,6 @@ /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* - * Copyright (C) 2007-2009 Kouhei Sutou <ko...@co...> + * Copyright (C) 2007-2014 Kouhei Sutou <ko...@cl...> * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -20,6 +20,8 @@ #ifndef __CUT_TEST_H__ #define __CUT_TEST_H__ +#include <setjmp.h> + #include <glib-object.h> #include <cutter/cut-private.h> @@ -87,6 +89,9 @@ struct _CutTestClass gboolean (*run) (CutTest *test, CutTestContext *test_context, CutRunContext *run_context); + void (*long_jump) (CutTest *test, + jmp_buf *jump_buffer, + gint value); gboolean (*is_available) (CutTest *test, CutTestContext *test_context, CutRunContext *run_context); @@ -108,6 +113,12 @@ gboolean cut_test_run (CutTest *test, CutTestContext *test_context, CutRunContext *run_context); +void cut_test_long_jump (CutTest *test, + jmp_buf *jump_buffer, + gint value); +gboolean cut_test_is_own_jump_buffer (CutTest *test, + jmp_buf *jump_buffer); + const gchar *cut_test_get_name (CutTest *test); void cut_test_set_name (CutTest *test, const gchar *name); Modified: test/cppcutter/test-cppcut-iterated-test.cpp (+32 -0) =================================================================== --- test/cppcutter/test-cppcut-iterated-test.cpp 2014-01-26 19:36:49 +0900 (0d2d687) +++ test/cppcutter/test-cppcut-iterated-test.cpp 2014-01-26 20:51:53 +0900 (55ef541) @@ -33,6 +33,7 @@ namespace cppcut_iterated_test CutRunContext *run_context; CutTestContext *test_context; CutTestResult *test_result; + gint n_destructor_calls; static gboolean run (void) @@ -60,6 +61,7 @@ namespace cppcut_iterated_test run_context = NULL; test_context = NULL; test_result = NULL; + n_destructor_calls = 0; } void @@ -152,6 +154,36 @@ namespace cppcut_iterated_test "void cppcut_test::stub_not_standard_exception()", NULL); } + + class DestructorCallCounter + { + public: + ~DestructorCallCounter() + { + n_destructor_calls++; + } + }; + + static void + stub_unwind_stack (gconstpointer data) + { + DestructorCallCounter counter; + + cut_fail("return from the test"); + } + + void + test_unwind_stack (void) + { + iterated_test = cppcut_iterated_test_new("unwind stack test", + stub_unwind_stack, + test_data); + cut_assert_not_null(iterated_test); + + cut_assert_false(run()); + cut_assert_test_result_summary(run_context, 1, 0, 0, 1, 0, 0, 0, 0); + cut_assert_equal_int(1, n_destructor_calls); + } } /* Modified: test/cppcutter/test-cppcut-test.cpp (+30 -11) =================================================================== --- test/cppcutter/test-cppcut-test.cpp 2014-01-26 19:36:49 +0900 (22a984d) +++ test/cppcutter/test-cppcut-test.cpp 2014-01-26 20:51:53 +0900 (3862137) @@ -27,22 +27,13 @@ #include "../lib/cuttest-assertions.h" -#define MARK_FAIL(assertion) do \ -{ \ - fail_line = __LINE__; \ - assertion; \ -} while (0) - -#define FAIL_LOCATION (cut_take_printf("%s:%d", __FILE__, fail_line)) - namespace cppcut_test { CppCutTest *test; CutRunContext *run_context; CutTestContext *test_context; CutTestResult *test_result; - - gint fail_line; + gint n_destructor_calls; static gboolean run (void) @@ -69,7 +60,7 @@ namespace cppcut_test test_context = NULL; test_result = NULL; - fail_line = 0; + n_destructor_calls = 0; } void @@ -157,6 +148,34 @@ namespace cppcut_test "void cppcut_test::stub_not_standard_exception()", NULL); } + + class DestructorCallCounter + { + public: + ~DestructorCallCounter() + { + n_destructor_calls++; + } + }; + + static void + stub_unwind_stack (void) + { + DestructorCallCounter counter; + + cut_fail("return from the test"); + } + + void + test_unwind_stack (void) + { + test = cppcut_test_new("unwind stack test", stub_unwind_stack); + cut_assert_not_null(test); + + cut_assert_false(run()); + cut_assert_test_result_summary(run_context, 1, 0, 0, 1, 0, 0, 0, 0); + cut_assert_equal_int(1, n_destructor_calls); + } } /* |
|
From: Kouhei S. <nul...@cl...> - 2014-01-26 10:37:08
|
Kouhei Sutou 2014-01-26 19:36:49 +0900 (Sun, 26 Jan 2014) New Revision: 16373ab8d8db224971940fa4dc7a5745b0ffe536 https://github.com/clear-code/cutter/commit/16373ab8d8db224971940fa4dc7a5745b0ffe536 Message: travis: use the latest cpp-coveralls GNU libtool support pull request has been merged: https://github.com/eddyxu/cpp-coveralls/pull/23 Modified files: .travis.yml Modified: .travis.yml (+2 -6) =================================================================== --- .travis.yml 2014-01-26 17:44:22 +0900 (3f885e6) +++ .travis.yml 2014-01-26 19:36:49 +0900 (bd96143) @@ -4,16 +4,12 @@ notifications: install: - sudo apt-get update -qq -y - sudo apt-get install -qq -y autotools-dev intltool gtk-doc-tools libgtk2.0-dev libgoffice-0.8-dev libgstreamer0.10-dev libsoup2.4-dev -# - sudo pip install cpp-coveralls - - sudo pip install requests + - sudo pip install cpp-coveralls before_script: - ./autogen.sh - ./configure --enable-coverage script: - test/run-test.sh after_success: -# - coveralls --exclude test - - git clone https://github.com/kou/cpp-coveralls - - (cd cpp-coveralls && git checkout support-libtool) - - PYTHONPATH=$PWD/cpp-coveralls python -c 'import coveralls; coveralls.run()' + - coveralls --exclude test |
|
From: Kouhei S. <nul...@cl...> - 2014-01-26 08:44:41
|
Kouhei Sutou 2014-01-26 17:44:22 +0900 (Sun, 26 Jan 2014) New Revision: 590a110066f359b406ada7905204a1a3a06fb7d1 https://github.com/clear-code/cutter/commit/590a110066f359b406ada7905204a1a3a06fb7d1 Message: Fix indent size Modified files: cppcutter/cppcut-test-invoke.cpp Modified: cppcutter/cppcut-test-invoke.cpp (+14 -14) =================================================================== --- cppcutter/cppcut-test-invoke.cpp 2014-01-26 17:03:15 +0900 (26ffb91) +++ cppcutter/cppcut-test-invoke.cpp 2014-01-26 17:44:22 +0900 (0cc04ed) @@ -35,20 +35,20 @@ cut::test::invoke (CutTestClass *cut_test_class, CutTestContext *test_context, CutRunContext *run_context) { - try { - cut_test_class->invoke(test, test_context, run_context); - } catch (const std::exception &exception) { - const gchar *message; - message = cut_take_printf("Unhandled C++ standard exception is thrown: " - "<%s>: %s", - typeid(exception).name(), - exception.what()); - cut_test_terminate(ERROR, message); - } catch (...) { - const gchar *message; - message = "Unhandled C++ non-standard exception is thrown"; - cut_test_terminate(ERROR, message); - } + try { + cut_test_class->invoke(test, test_context, run_context); + } catch (const std::exception &exception) { + const gchar *message; + message = cut_take_printf("Unhandled C++ standard exception is thrown: " + "<%s>: %s", + typeid(exception).name(), + exception.what()); + cut_test_terminate(ERROR, message); + } catch (...) { + const gchar *message; + message = "Unhandled C++ non-standard exception is thrown"; + cut_test_terminate(ERROR, message); + } } /* |
|
From: Kouhei S. <nul...@cl...> - 2014-01-26 08:03:38
|
Kouhei Sutou 2014-01-26 17:03:15 +0900 (Sun, 26 Jan 2014) New Revision: deb7c66c1593cbec43c43297ac06a11975aa2fa2 https://github.com/clear-code/cutter/commit/deb7c66c1593cbec43c43297ac06a11975aa2fa2 Message: Add missing "_buffer" to function names cut_test_context_set_jump -> cut_test_context_set_jump_buffer +++++++ cut_test_context_get_jump -> cut_test_context_get_jump_buffer +++++++ Modified files: cutter/cut-assertions-helper.h cutter/cut-public.h cutter/cut-test-case.c cutter/cut-test-context.c cutter/cut-test-iterator.c cutter/cut-test.c Modified: cutter/cut-assertions-helper.h (+6 -6) =================================================================== --- cutter/cut-assertions-helper.h 2014-01-26 00:21:06 +0900 (f6e231f) +++ cutter/cut-assertions-helper.h 2014-01-26 17:03:15 +0900 (6e994f1) @@ -1,6 +1,6 @@ /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* - * Copyright (C) 2007-2010 Kouhei Sutou <ko...@cl...> + * Copyright (C) 2007-2014 Kouhei Sutou <ko...@cl...> * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -34,14 +34,14 @@ extern "C" { \ cut_test_context_start_user_message_jump(cut_get_current_test_context()); \ cut_previous_jump_buffer = \ - cut_test_context_get_jump(cut_get_current_test_context()); \ - cut_test_context_set_jump(cut_get_current_test_context(), \ - &cut_jump_buffer); \ + cut_test_context_get_jump_buffer(cut_get_current_test_context()); \ + cut_test_context_set_jump_buffer(cut_get_current_test_context(), \ + &cut_jump_buffer); \ if (setjmp(cut_jump_buffer) == 0) { \ assertion; \ } \ - cut_test_context_set_jump(cut_get_current_test_context(), \ - cut_previous_jump_buffer); \ + cut_test_context_set_jump_buffer(cut_get_current_test_context(), \ + cut_previous_jump_buffer); \ cut_test_context_finish_user_message_jump(cut_get_current_test_context()); \ \ do { \ Modified: cutter/cut-public.h (+5 -3) =================================================================== --- cutter/cut-public.h 2014-01-26 00:21:06 +0900 (6df15d7) +++ cutter/cut-public.h 2014-01-26 17:03:15 +0900 (f0d196c) @@ -1,6 +1,6 @@ /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* - * Copyright (C) 2007-2011 Kouhei Sutou <ko...@cl...> + * Copyright (C) 2007-2014 Kouhei Sutou <ko...@cl...> * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -108,9 +108,11 @@ void cut_test_context_finish_user_message_jump (CutTestContext *context); cut_boolean cut_test_context_in_user_message_jump (CutTestContext *context); -void cut_test_context_set_jump (CutTestContext *context, +void cut_test_context_set_jump_buffer + (CutTestContext *context, jmp_buf *buffer); -jmp_buf *cut_test_context_get_jump (CutTestContext *context); +jmp_buf *cut_test_context_get_jump_buffer + (CutTestContext *context); void cut_test_context_long_jump (CutTestContext *context); const void *cut_test_context_take (CutTestContext *context, Modified: cutter/cut-test-case.c (+5 -5) =================================================================== --- cutter/cut-test-case.c 2014-01-26 00:21:06 +0900 (8c4fc1e) +++ cutter/cut-test-case.c 2014-01-26 17:03:15 +0900 (f115a21) @@ -1,6 +1,6 @@ /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* - * Copyright (C) 2007-2011 Kouhei Sutou <ko...@cl...> + * Copyright (C) 2007-2014 Kouhei Sutou <ko...@cl...> * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -373,7 +373,7 @@ cut_test_case_run_setup (CutTestCase *test_case, CutTestContext *test_context) if (priv->setup) { jmp_buf jump_buffer; - cut_test_context_set_jump(test_context, &jump_buffer); + cut_test_context_set_jump_buffer(test_context, &jump_buffer); if (setjmp(jump_buffer) == 0) { priv->setup(); } @@ -389,7 +389,7 @@ cut_test_case_run_teardown (CutTestCase *test_case, CutTestContext *test_context if (priv->teardown) { jmp_buf jump_buffer; - cut_test_context_set_jump(test_context, &jump_buffer); + cut_test_context_set_jump_buffer(test_context, &jump_buffer); if (setjmp(jump_buffer) == 0) { priv->teardown(); } @@ -479,7 +479,7 @@ cut_test_case_run_startup (CutTestCase *test_case, CutTestContext *test_context) if (priv->startup) { jmp_buf jump_buffer; - cut_test_context_set_jump(test_context, &jump_buffer); + cut_test_context_set_jump_buffer(test_context, &jump_buffer); if (setjmp(jump_buffer) == 0) { priv->startup(); } @@ -495,7 +495,7 @@ cut_test_case_run_shutdown (CutTestCase *test_case, CutTestContext *test_context if (priv->shutdown) { jmp_buf jump_buffer; - cut_test_context_set_jump(test_context, &jump_buffer); + cut_test_context_set_jump_buffer(test_context, &jump_buffer); if (setjmp(jump_buffer) == 0) { priv->shutdown(); } Modified: cutter/cut-test-context.c (+3 -3) =================================================================== --- cutter/cut-test-context.c 2014-01-26 00:21:06 +0900 (3da898a) +++ cutter/cut-test-context.c 2014-01-26 17:03:15 +0900 (d06200c) @@ -1,6 +1,6 @@ /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* - * Copyright (C) 2007-2013 Kouhei Sutou <ko...@cl...> + * Copyright (C) 2007-2014 Kouhei Sutou <ko...@cl...> * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -823,7 +823,7 @@ cut_test_context_get_n_data (CutTestContext *context) } void -cut_test_context_set_jump (CutTestContext *context, jmp_buf *buffer) +cut_test_context_set_jump_buffer (CutTestContext *context, jmp_buf *buffer) { CutTestContextPrivate *priv = CUT_TEST_CONTEXT_GET_PRIVATE(context); @@ -831,7 +831,7 @@ cut_test_context_set_jump (CutTestContext *context, jmp_buf *buffer) } jmp_buf * -cut_test_context_get_jump (CutTestContext *context) +cut_test_context_get_jump_buffer (CutTestContext *context) { return CUT_TEST_CONTEXT_GET_PRIVATE(context)->jump_buffer; } Modified: cutter/cut-test-iterator.c (+2 -2) =================================================================== --- cutter/cut-test-iterator.c 2014-01-26 00:21:06 +0900 (f1200bc) +++ cutter/cut-test-iterator.c 2014-01-26 17:03:15 +0900 (aa73aa5) @@ -1,6 +1,6 @@ /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* - * Copyright (C) 2008-2009 Kouhei Sutou <ko...@co...> + * Copyright (C) 2008-2014 Kouhei Sutou <ko...@cl...> * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -526,7 +526,7 @@ run (CutTest *test, CutTestContext *test_context, CutRunContext *run_context) cut_test_context_set_test_iterator(test_context, test_iterator); if (priv->data_setup_function) { - cut_test_context_set_jump(test_context, &jump_buffer); + cut_test_context_set_jump_buffer(test_context, &jump_buffer); if (setjmp(jump_buffer) == 0) { priv->data_setup_function(); } Modified: cutter/cut-test.c (+2 -2) =================================================================== --- cutter/cut-test.c 2014-01-26 00:21:06 +0900 (09e6ef6) +++ cutter/cut-test.c 2014-01-26 17:03:15 +0900 (a8468da) @@ -1,6 +1,6 @@ /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* - * Copyright (C) 2007-2012 Kouhei Sutou <ko...@cl...> + * Copyright (C) 2007-2014 Kouhei Sutou <ko...@cl...> * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -459,7 +459,7 @@ run (CutTest *test, CutTestContext *test_context, CutRunContext *run_context) case 0: g_signal_emit_by_name(test, "start", test_context); - cut_test_context_set_jump(test_context, &jump_buffer); + cut_test_context_set_jump_buffer(test_context, &jump_buffer); if (setjmp(jump_buffer) == 0) { if (priv->timer) { g_timer_start(priv->timer); |
|
From: Kouhei S. <nul...@cl...> - 2014-01-25 15:21:24
|
Kouhei Sutou 2014-01-26 00:21:06 +0900 (Sun, 26 Jan 2014) New Revision: aa311d5e6d38689d5626645ecef0d71c202fcf31 https://github.com/clear-code/cutter/commit/aa311d5e6d38689d5626645ecef0d71c202fcf31 Message: travis: use GNU libtool supported cpp-coveralls Modified files: .travis.yml Modified: .travis.yml (+7 -2) =================================================================== --- .travis.yml 2014-01-26 00:20:28 +0900 (fcc3e70) +++ .travis.yml 2014-01-26 00:21:06 +0900 (3f885e6) @@ -4,11 +4,16 @@ notifications: install: - sudo apt-get update -qq -y - sudo apt-get install -qq -y autotools-dev intltool gtk-doc-tools libgtk2.0-dev libgoffice-0.8-dev libgstreamer0.10-dev libsoup2.4-dev - - sudo pip install cpp-coveralls +# - sudo pip install cpp-coveralls + - sudo pip install requests before_script: - ./autogen.sh - ./configure --enable-coverage script: - test/run-test.sh after_success: - - coveralls --exclude test +# - coveralls --exclude test + - git clone https://github.com/kou/cpp-coveralls + - (cd cpp-coveralls && git checkout support-libtool) + - PYTHONPATH=$PWD/cpp-coveralls python -c 'import coveralls; coveralls.run()' + |
|
From: Kouhei S. <nul...@cl...> - 2014-01-25 15:20:46
|
Kouhei Sutou 2014-01-26 00:20:28 +0900 (Sun, 26 Jan 2014) New Revision: 4068e5253dd91bc10399fee8e2497422d972d555 https://github.com/clear-code/cutter/commit/4068e5253dd91bc10399fee8e2497422d972d555 Message: travis: remove deprecated "--use-mirrors" option Modified files: .travis.yml Modified: .travis.yml (+1 -1) =================================================================== --- .travis.yml 2014-01-26 00:19:51 +0900 (234954b) +++ .travis.yml 2014-01-26 00:20:28 +0900 (fcc3e70) @@ -4,7 +4,7 @@ notifications: install: - sudo apt-get update -qq -y - sudo apt-get install -qq -y autotools-dev intltool gtk-doc-tools libgtk2.0-dev libgoffice-0.8-dev libgstreamer0.10-dev libsoup2.4-dev - - sudo pip install cpp-coveralls --use-mirrors + - sudo pip install cpp-coveralls before_script: - ./autogen.sh - ./configure --enable-coverage |
|
From: Kouhei S. <nul...@cl...> - 2014-01-25 15:20:11
|
Kouhei Sutou 2014-01-26 00:19:51 +0900 (Sun, 26 Jan 2014) New Revision: cffe06ac801b49b81d87665ddf57c63d79bfa6e4 https://github.com/clear-code/cutter/commit/cffe06ac801b49b81d87665ddf57c63d79bfa6e4 Message: Remove auto generated files by 'make clean' Modified files: cutter/Makefile.am Modified: cutter/Makefile.am (+4 -1) =================================================================== --- cutter/Makefile.am 2014-01-26 00:19:40 +0900 (659828a) +++ cutter/Makefile.am 2014-01-26 00:19:51 +0900 (964d0bf) @@ -8,7 +8,10 @@ AM_CFLAGS = \ $(CUTTER_CFLAGS) \ $(COVERAGE_CFLAGS) -CLEANFILES = *.gcno *.gcda +CLEANFILES = \ + *.gcno \ + *.gcda \ + *.gcov lib_LTLIBRARIES = libcutter.la |
|
From: Kouhei S. <nul...@cl...> - 2014-01-25 15:20:11
|
Kouhei Sutou 2014-01-26 00:19:40 +0900 (Sun, 26 Jan 2014) New Revision: eed80e4791bccd2d9b28be34a26759aaa4251734 https://github.com/clear-code/cutter/commit/eed80e4791bccd2d9b28be34a26759aaa4251734 Message: Ignore auto generated files Modified files: .gitignore Modified: .gitignore (+1 -0) =================================================================== --- .gitignore 2014-01-24 11:54:03 +0900 (2928149) +++ .gitignore 2014-01-26 00:19:40 +0900 (e5f27b4) @@ -6,6 +6,7 @@ .libs *.gcno *.gcda +*.gcov *.log *.trs *~ |
|
From: Kouhei S. <nul...@cl...> - 2014-01-24 02:54:20
|
Kouhei Sutou 2014-01-24 11:54:03 +0900 (Fri, 24 Jan 2014) New Revision: a5d459157bbef23275b89c23af63b803a3e8e0a8 https://github.com/clear-code/cutter/commit/a5d459157bbef23275b89c23af63b803a3e8e0a8 Message: Remove auto generated coverage report files Modified files: .gitignore Modified: .gitignore (+2 -0) =================================================================== --- .gitignore 2014-01-24 11:53:42 +0900 (7539ed8) +++ .gitignore 2014-01-24 11:54:03 +0900 (2928149) @@ -18,6 +18,8 @@ /config.log /config.status /configure +/coverage.info +/coverage/ /cutter.pc /gcutter.pc /gdkcutter-pixbuf.pc |
|
From: Kouhei S. <nul...@cl...> - 2014-01-24 02:54:00
|
Kouhei Sutou 2014-01-24 11:53:42 +0900 (Fri, 24 Jan 2014) New Revision: 05cc46e5ef9256b3ba0cc039e940c2e5f69bb460 https://github.com/clear-code/cutter/commit/05cc46e5ef9256b3ba0cc039e940c2e5f69bb460 Message: Remove needless coverage compiler flags from tests Modified files: test/cppcutter/Makefile.am test/fixtures/loader/cpp-fixture/Makefile.am test/fixtures/loader/cpp/Makefile.am Modified: test/cppcutter/Makefile.am (+2 -4) =================================================================== --- test/cppcutter/Makefile.am 2014-01-24 10:17:02 +0900 (14eb84f) +++ test/cppcutter/Makefile.am 2014-01-24 11:53:42 +0900 (c44b2e4) @@ -7,8 +7,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/test/lib AM_CXXFLAGS = \ - $(CUTTER_CFLAGS) \ - $(COVERAGE_CFLAGS) + $(CUTTER_CFLAGS) CLEANFILES = *.gcno *.gcda @@ -25,8 +24,7 @@ LIBS = \ $(top_builddir)/cutter/libcutter.la \ $(top_builddir)/cppcutter/libcppcutter.la \ $(top_builddir)/test/lib/libcuttest-utils.la \ - $(GLIB_LIBS) \ - $(COVERAGE_LIBS) + $(GLIB_LIBS) test_cppcut_la_SOURCES = \ test-cppcut-assertions.cpp \ Modified: test/fixtures/loader/cpp-fixture/Makefile.am (+0 -3) =================================================================== --- test/fixtures/loader/cpp-fixture/Makefile.am 2014-01-24 10:17:02 +0900 (6a8c5b9) +++ test/fixtures/loader/cpp-fixture/Makefile.am 2014-01-24 11:53:42 +0900 (85aa9b7) @@ -6,9 +6,6 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/gcutter \ -I$(top_srcdir)/cppcutter -AM_CXXFLAGS = \ - $(COVERAGE_CFLAGS) - noinst_LTLIBRARIES = \ with-prefix.la \ without-prefix.la \ Modified: test/fixtures/loader/cpp/Makefile.am (+0 -3) =================================================================== --- test/fixtures/loader/cpp/Makefile.am 2014-01-24 10:17:02 +0900 (8a11ad2) +++ test/fixtures/loader/cpp/Makefile.am 2014-01-24 11:53:42 +0900 (ad3664c) @@ -6,9 +6,6 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/gcutter \ -I$(top_srcdir)/cppcutter -AM_CXXFLAGS = \ - $(COVERAGE_CFLAGS) - noinst_LTLIBRARIES = \ stub-namespace.la \ stub-multi-namespace.la \ |
|
From: Kouhei S. <nul...@cl...> - 2014-01-24 01:17:25
|
Kouhei Sutou 2014-01-24 10:17:02 +0900 (Fri, 24 Jan 2014) New Revision: 0cf31023d69eebead8b78eeebb0a77b3cbcf43bc https://github.com/clear-code/cutter/commit/0cf31023d69eebead8b78eeebb0a77b3cbcf43bc Message: travis: don't report coverage for test Modified files: .travis.yml Modified: .travis.yml (+1 -1) =================================================================== --- .travis.yml 2014-01-24 10:04:26 +0900 (ebbdd0c) +++ .travis.yml 2014-01-24 10:17:02 +0900 (234954b) @@ -11,4 +11,4 @@ before_script: script: - test/run-test.sh after_success: - - coveralls + - coveralls --exclude test |
|
From: Kouhei S. <nul...@cl...> - 2014-01-24 01:04:50
|
Kouhei Sutou 2014-01-24 10:04:26 +0900 (Fri, 24 Jan 2014) New Revision: 9eac88bb73e787f2fab14a399992401f8dee11f5 https://github.com/clear-code/cutter/commit/9eac88bb73e787f2fab14a399992401f8dee11f5 Message: Ignore auto generated files for coverage Modified files: .gitignore Modified: .gitignore (+3 -0) =================================================================== --- .gitignore 2014-01-24 10:03:55 +0900 (67a20ad) +++ .gitignore 2014-01-24 10:04:26 +0900 (7539ed8) @@ -5,6 +5,9 @@ .deps .libs *.gcno +*.gcda +*.log +*.trs *~ /.gdb_history /aclocal.m4 |
|
From: Kouhei S. <nul...@cl...> - 2014-01-24 01:04:16
|
Kouhei Sutou 2014-01-24 10:03:55 +0900 (Fri, 24 Jan 2014) New Revision: 1d7deff3ac1223091788522c9c24992b5381e95b https://github.com/clear-code/cutter/commit/1d7deff3ac1223091788522c9c24992b5381e95b Message: Ignore auto generated files for coverage Modified files: .gitignore Modified: .gitignore (+1 -0) =================================================================== --- .gitignore 2014-01-24 10:02:58 +0900 (3a0f1fb) +++ .gitignore 2014-01-24 10:03:55 +0900 (67a20ad) @@ -4,6 +4,7 @@ *.exe .deps .libs +*.gcno *~ /.gdb_history /aclocal.m4 |
|
From: Kouhei S. <nul...@cl...> - 2014-01-24 01:03:22
|
Kouhei Sutou 2014-01-24 10:02:58 +0900 (Fri, 24 Jan 2014) New Revision: 6ba6f86fd1039fb6f4b511892f0007a45f58a83b https://github.com/clear-code/cutter/commit/6ba6f86fd1039fb6f4b511892f0007a45f58a83b Message: Don't require LCOV for just generating coverage info LCOV is still required to generate a coverage report. Modified files: configure.ac m4macros/cutter.m4 Modified: configure.ac (+1 -0) =================================================================== --- configure.ac 2014-01-24 00:42:35 +0900 (b2669fb) +++ configure.ac 2014-01-24 10:02:58 +0900 (e21778a) @@ -1040,6 +1040,7 @@ echo "Configure Result:" echo echo " Options:" echo " coverage : $cutter_enable_coverage" +echo " coverage report by LCOV : $cutter_enable_coverage_report_lcov" echo echo " Libraries:" echo " GLib <= 2.12 : $glib_2_12" Modified: m4macros/cutter.m4 (+11 -6) =================================================================== --- m4macros/cutter.m4 2014-01-24 00:42:35 +0900 (1642289) +++ m4macros/cutter.m4 2014-01-24 10:02:58 +0900 (1b97644) @@ -1,10 +1,13 @@ AC_DEFUN([AC_CHECK_ENABLE_COVERAGE], [ + AC_MSG_CHECKING([for enabling coverage]) AC_ARG_ENABLE([coverage], AS_HELP_STRING([--enable-coverage], [Enable coverage]), [cutter_enable_coverage=$enableval], [cutter_enable_coverage=no]) + AC_MSG_RESULT($cutter_enable_coverage) + cutter_enable_coverage_report_lcov=no if test "x$cutter_enable_coverage" != "xno"; then ltp_version_list="1.6 1.7 1.8 1.9 1.10" AC_PATH_TOOL(LCOV, lcov) @@ -24,17 +27,17 @@ AC_DEFUN([AC_CHECK_ENABLE_COVERAGE], ]) fi + AC_MSG_CHECKING([for enabling coverage report by LCOV]) case "$cutter_cv_ltp_version" in *\(ok\)*) - cutter_enable_coverage=yes + cutter_enable_coverage_report_lcov=yes ;; *) - cutter_enable_coverage=no + cutter_enable_coverage_report_lcov=no ;; esac + AC_MSG_RESULT($cutter_enable_coverage_report_lcov) fi - AC_MSG_CHECKING([for enabling coverage]) - AC_MSG_RESULT($cutter_enable_coverage) ]) AC_DEFUN([AC_CHECK_COVERAGE], @@ -56,6 +59,8 @@ AC_DEFUN([AC_CHECK_COVERAGE], AC_SUBST(COVERAGE_CFLAGS) AC_SUBST(COVERAGE_LIBS) AM_CONDITIONAL([ENABLE_COVERAGE], [test "$cutter_enable_coverage" = "yes"]) + AM_CONDITIONAL([ENABLE_COVERAGE_REPORT_LCOV], + [test "$cutter_enable_coverage_report_lcov" = "yes"]) COVERAGE_INFO_FILE="coverage.info" AC_SUBST(COVERAGE_INFO_FILE) @@ -68,8 +73,8 @@ AC_DEFUN([AC_CHECK_COVERAGE], fi AC_SUBST(GENHTML_OPTIONS) - if test "$cutter_enable_coverage" = "yes"; then - AC_CONFIG_COMMANDS([coverage], [ + if test "$cutter_enable_coverage_report_lcov" = "yes"; then + AC_CONFIG_COMMANDS([coverage-report-lcov], [ if test -e "$ac_check_coverage_makefile" && \ grep -q '^coverage:' $ac_check_coverage_makefile; then : # do nothing |
|
From: Kouhei S. <nul...@cl...> - 2014-01-23 15:42:55
|
Kouhei Sutou 2014-01-24 00:42:35 +0900 (Fri, 24 Jan 2014) New Revision: 3102fc572863817725a4650e4ce59f5ed48074b3 https://github.com/clear-code/cutter/commit/3102fc572863817725a4650e4ce59f5ed48074b3 Message: Add missing -lgcov to linker flags for coverage It is required for C++ programs. Modified files: cppcutter/Makefile.am cutter/Makefile.am m4macros/cutter.m4 soupcutter/Makefile.am test/cppcutter/Makefile.am test/fixtures/loader/cpp-fixture/Makefile.am test/fixtures/loader/cpp/Makefile.am Modified: cppcutter/Makefile.am (+2 -1) =================================================================== --- cppcutter/Makefile.am 2014-01-24 00:42:03 +0900 (3842a25) +++ cppcutter/Makefile.am 2014-01-24 00:42:35 +0900 (8af4b32) @@ -50,7 +50,8 @@ libcppcutter_la_LDFLAGS = \ libcppcutter_la_LIBADD = \ $(top_builddir)/cutter/libcutter.la \ - $(GLIB_LIBS) + $(GLIB_LIBS) \ + $(COVERAGE_LIBS) echo-public-headers: @for header in $(cppcutter_include_HEADERS); do \ Modified: cutter/Makefile.am (+2 -1) =================================================================== --- cutter/Makefile.am 2014-01-24 00:42:03 +0900 (c4d0745) +++ cutter/Makefile.am 2014-01-24 00:42:35 +0900 (659828a) @@ -194,7 +194,8 @@ libcutter_la_LIBADD = \ $(top_builddir)/gcutter/libgcutter.la \ $(GLIB_LIBS) \ $(BFD_LIBS) \ - $(WINDOWS_LIBS) + $(WINDOWS_LIBS) \ + $(COVERAGE_LIBS) if GLIB_2_12 libcutter_la_LIBADD += \ Modified: m4macros/cutter.m4 (+3 -0) =================================================================== --- m4macros/cutter.m4 2014-01-24 00:42:03 +0900 (6b1324b) +++ m4macros/cutter.m4 2014-01-24 00:42:35 +0900 (1642289) @@ -48,10 +48,13 @@ AC_DEFUN([AC_CHECK_COVERAGE], AC_CHECK_ENABLE_COVERAGE COVERAGE_CFLAGS= + COVERAGE_LIBS= if test "$cutter_enable_coverage" = "yes"; then COVERAGE_CFLAGS="--coverage" + COVERAGE_LIBS="-lgcov" fi AC_SUBST(COVERAGE_CFLAGS) + AC_SUBST(COVERAGE_LIBS) AM_CONDITIONAL([ENABLE_COVERAGE], [test "$cutter_enable_coverage" = "yes"]) COVERAGE_INFO_FILE="coverage.info" Modified: soupcutter/Makefile.am (+2 -1) =================================================================== --- soupcutter/Makefile.am 2014-01-24 00:42:03 +0900 (2e5371b) +++ soupcutter/Makefile.am 2014-01-24 00:42:35 +0900 (2bb6f38) @@ -40,7 +40,8 @@ libsoupcutter_la_LDFLAGS = \ libsoupcutter_la_LIBADD = \ $(top_builddir)/cutter/libcutter.la \ - $(LIBSOUP_LIBS) + $(LIBSOUP_LIBS) \ + $(COVERAGE_LIBS) echo-public-headers: @for header in $(soupcutter_include_HEADERS); do \ Modified: test/cppcutter/Makefile.am (+2 -1) =================================================================== --- test/cppcutter/Makefile.am 2014-01-24 00:42:03 +0900 (7182eaa) +++ test/cppcutter/Makefile.am 2014-01-24 00:42:35 +0900 (14eb84f) @@ -25,7 +25,8 @@ LIBS = \ $(top_builddir)/cutter/libcutter.la \ $(top_builddir)/cppcutter/libcppcutter.la \ $(top_builddir)/test/lib/libcuttest-utils.la \ - $(GLIB_LIBS) + $(GLIB_LIBS) \ + $(COVERAGE_LIBS) test_cppcut_la_SOURCES = \ test-cppcut-assertions.cpp \ Modified: test/fixtures/loader/cpp-fixture/Makefile.am (+2 -1) =================================================================== --- test/fixtures/loader/cpp-fixture/Makefile.am 2014-01-24 00:42:03 +0900 (3d8751d) +++ test/fixtures/loader/cpp-fixture/Makefile.am 2014-01-24 00:42:35 +0900 (6a8c5b9) @@ -25,7 +25,8 @@ LIBS = \ $(top_builddir)/gcutter/libgcutter.la \ $(top_builddir)/cppcutter/libcppcutter.la \ $(GLIB_LIBS) \ - $(GIO_LIBS) + $(GIO_LIBS) \ + $(COVERAGE_LIBS) with_prefix_la_SOURCES = with-prefix.cpp without_prefix_la_SOURCES = without-prefix.cpp Modified: test/fixtures/loader/cpp/Makefile.am (+2 -1) =================================================================== --- test/fixtures/loader/cpp/Makefile.am 2014-01-24 00:42:03 +0900 (6660168) +++ test/fixtures/loader/cpp/Makefile.am 2014-01-24 00:42:35 +0900 (8a11ad2) @@ -26,7 +26,8 @@ LIBS = \ $(top_builddir)/gcutter/libgcutter.la \ $(top_builddir)/cppcutter/libcppcutter.la \ $(GLIB_LIBS) \ - $(GIO_LIBS) + $(GIO_LIBS) \ + $(COVERAGE_LIBS) stub_namespace_la_SOURCES = stub-namespace.cpp stub_multi_namespace_la_SOURCES = stub-multi-namespace.cpp |
|
From: Kouhei S. <nul...@cl...> - 2014-01-23 15:42:52
|
Kouhei Sutou 2014-01-24 00:42:03 +0900 (Fri, 24 Jan 2014) New Revision: 41169968d0b845ab23827d323f7544d1d273f153 https://github.com/clear-code/cutter/commit/41169968d0b845ab23827d323f7544d1d273f153 Message: travis: enable Coveralls Modified files: .travis.yml Modified: .travis.yml (+4 -1) =================================================================== --- .travis.yml 2014-01-24 00:40:08 +0900 (bfe6d11) +++ .travis.yml 2014-01-24 00:42:03 +0900 (ebbdd0c) @@ -4,8 +4,11 @@ notifications: install: - sudo apt-get update -qq -y - sudo apt-get install -qq -y autotools-dev intltool gtk-doc-tools libgtk2.0-dev libgoffice-0.8-dev libgstreamer0.10-dev libsoup2.4-dev + - sudo pip install cpp-coveralls --use-mirrors before_script: - ./autogen.sh - - ./configure + - ./configure --enable-coverage script: - test/run-test.sh +after_success: + - coveralls |