[gxml/gxml-0.20] Unit Tests: split XElement tests



commit 2bc7143111551ea01abb5b5212bf36b3db28de48
Author: Daniel Espinosa <esodan gmail com>
Date:   Wed Mar 17 13:27:32 2021 -0600

    Unit Tests: split XElement tests

 test/GXmlTest.vala     |  1 -
 test/XElementTest.vala |  8 ++++++--
 test/meson.build       | 14 +++++++++++++-
 3 files changed, 19 insertions(+), 4 deletions(-)
---
diff --git a/test/GXmlTest.vala b/test/GXmlTest.vala
index 2e11d982..0688b0ee 100644
--- a/test/GXmlTest.vala
+++ b/test/GXmlTest.vala
@@ -30,7 +30,6 @@ class GXmlTest {
                // Sets 29 as fatal flags, 16 + 8 + 4 + 1; bits 0,2,3,4, recursion,error,critical,warning; 
we'll want to undo that warning one so we can catch it
                Test.init (ref args);
                ValaLibxml2Test.add_tests ();
-               XElementTest.add_tests ();
                XPathTest.add_tests ();
 
                Test.run ();
diff --git a/test/XElementTest.vala b/test/XElementTest.vala
index a2492c4d..383205e3 100644
--- a/test/XElementTest.vala
+++ b/test/XElementTest.vala
@@ -22,8 +22,8 @@
 
 using GXml;
 
-class XElementTest : GXmlTest  {
-       public static void add_tests () {
+class XElementTest : GLib.Object  {
+       public static int main (string[] args) {
                Test.add_func ("/gxml/gelement/to_string", () =>{
                        try {
                                DomDocument doc = new XDocument.from_string ("<root />");
@@ -145,5 +145,9 @@ class XElementTest : GXmlTest  {
         assert_not_reached ();
       }
     });
+
+               Test.run ();
+
+               return 0;
        }
 }
diff --git a/test/meson.build b/test/meson.build
index 67ff1c42..682229b1 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -6,7 +6,6 @@ testdirs_dep = declare_dependency (compile_args : [
 files_xtests = files ([
                'GXmlTest.vala',
                'ValaLibxml2Test.vala',
-               'XElementTest.vala',
                'XPathTest.vala',
        ])
 
@@ -47,6 +46,19 @@ xthtmldoc = executable('htmlxdocument', files_xhtmldoc + configvapi + configtest
 
 test ('htmlxdocument', xthtmldoc)
 
+files_xelement = files ([
+               'XElementTest.vala',
+       ])
+
+txelement = executable('xelement', files_xelement + configvapi + configtestvapi,
+       vala_args : [],
+       c_args: tests_cargs,
+       dependencies : [ libgxml_deps, inc_libh_dep, testdirs_dep, inc_rooth_dep],
+       link_with: libgxml
+)
+
+test ('xelement', txelement)
+
 files_xsd_tests = files ([
                'XsdSchemaTest.vala',
        ])


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]