From: Jürg Billeter Date: Wed, 4 Feb 2009 20:05:55 +0000 (+0000) Subject: Add GTestCase and GTestSuite bindings, patch by John Carr, fixes bug X-Git-Tag: 0.5.7~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46079e218f374667eb8afdb829941a66ea9fcd41;p=thirdparty%2Fvala.git Add GTestCase and GTestSuite bindings, patch by John Carr, fixes bug 2009-02-04 Jürg Billeter * vapi/glib-2.0.vapi: Add GTestCase and GTestSuite bindings, patch by John Carr, fixes bug 570518 svn path=/trunk/; revision=2418 --- diff --git a/ChangeLog b/ChangeLog index 01045d22b..730f93ad9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-02-04 Jürg Billeter + + * vapi/glib-2.0.vapi: + + Add GTestCase and GTestSuite bindings, patch by John Carr, + fixes bug 570518 + 2009-02-02 Jürg Billeter * vala/valacodewriter.vala: diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi index db7b3ac53..e11855c90 100644 --- a/vapi/glib-2.0.vapi +++ b/vapi/glib-2.0.vapi @@ -2702,6 +2702,27 @@ namespace GLib { public static double rand_double_range (); } + [Compact] + [CCode (cname = "GTestCase", ref_function = "", unref_function = "")] + public class TestCase { + [CCode (cname = "g_test_create_case")] + public TestCase (string test_name, size_t data_size, [CCode (delegate_target_pos = 2.9)] TestFunc data_setupvoid, [CCode (delegate_target_pos = 2.9)] TestFunc data_funcvoid, [CCode (delegate_target_pos = 2.9)] TestFunc data_teardownvoid); + } + + [Compact] + [CCode (cname = "GTestSuite", ref_function = "", unref_function = "")] + public class TestSuite { + [CCode (cname = "g_test_create_suite")] + public TestSuite (string name); + [CCode (cname = "g_test_get_root")] + public static TestSuite get_root (); + [CCode (cname = "g_test_suite_add")] + public void add (TestCase test_case); + [CCode (cname = "g_test_suite_add_suite")] + public void add_suite (TestSuite test_suite); + } + + public delegate void TestFunc (void* fixture); public delegate void DataTestFunc (); [Flags]