]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Add GTestCase and GTestSuite bindings, patch by John Carr, fixes bug
authorJürg Billeter <j@bitron.ch>
Wed, 4 Feb 2009 20:05:55 +0000 (20:05 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Wed, 4 Feb 2009 20:05:55 +0000 (20:05 +0000)
2009-02-04  Jürg Billeter  <j@bitron.ch>

* vapi/glib-2.0.vapi:

Add GTestCase and GTestSuite bindings, patch by John Carr,
fixes bug 570518

svn path=/trunk/; revision=2418

ChangeLog
vapi/glib-2.0.vapi

index 01045d22be13e1c820e6d97b9939a20fa34f42c8..730f93ad9fddfdef971c30e875acbe164056c505 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-02-04  Jürg Billeter  <j@bitron.ch>
+
+       * vapi/glib-2.0.vapi:
+
+       Add GTestCase and GTestSuite bindings, patch by John Carr,
+       fixes bug 570518
+
 2009-02-02  Jürg Billeter  <j@bitron.ch>
 
        * vala/valacodewriter.vala:
index db7b3ac53760f1da627852c7da96642ba24a5cf9..e11855c9085e0c066224add5a5ee78f4642c2552 100644 (file)
@@ -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]