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



commit e8b91b0b1374ca1982720a3aba78163b59710018
Author: Daniel Espinosa <esodan gmail com>
Date:   Mon Mar 15 23:36:37 2021 -0600

    Unit Tests: split XSD tests

 test/GXmlDomTest.vala   | 38 --------------------------------------
 test/XsdSchemaTest.vala |  9 +++++++--
 test/meson.build        |  7 +++----
 3 files changed, 10 insertions(+), 44 deletions(-)
---
diff --git a/test/XsdSchemaTest.vala b/test/XsdSchemaTest.vala
index 5d6ffdce..3b7cdfec 100644
--- a/test/XsdSchemaTest.vala
+++ b/test/XsdSchemaTest.vala
@@ -22,8 +22,9 @@
 
 using GXml;
 
-class GomSchemaTest : GXmlTest  {
-       public static void add_tests () {
+class GomSchemaTest : GLib.Object  {
+       public static int main (string[] args) {
+               Test.init (ref args);
                Test.add_func ("/gxml/gom-schema/read", () => {
                        try {
                                var f = GLib.File.new_for_path (GXmlTestConfig.TEST_DIR+"/schema-test.xsd");
@@ -80,5 +81,9 @@ class GomSchemaTest : GXmlTest  {
                                assert_not_reached ();
                        }
                });
+
+               Test.run ();
+
+               return 0;
        }
 }
diff --git a/test/meson.build b/test/meson.build
index d64e6c5a..fb0dee28 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -23,19 +23,18 @@ xt = executable('libxml-tests', files_xtests + configvapi + configtestvapi,
 
 test ('libxml-tests', xt)
 
-files_tests = files ([
-               'GXmlDomTest.vala',
+files_xsd_tests = files ([
                'XsdSchemaTest.vala',
        ])
 
-t = executable('dom-tests', files_tests + configvapi + configtestvapi,
+t = executable('xsd', files_xsd_tests + configvapi + configtestvapi,
        vala_args : [],
        c_args: tests_cargs,
        dependencies : [ libgxml_deps, inc_libh_dep, testdirs_dep, inc_rooth_dep],
        link_with: libgxml
 )
 
-test ('dom-tests', t)
+test ('xsd', t)
 
 files_document_tests = files ([
                'DocumentTest.vala',


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