[gxml/gxml-0.20] Unit Tests: split GXml.Element tests
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml/gxml-0.20] Unit Tests: split GXml.Element tests
- Date: Mon, 23 Aug 2021 03:06:43 +0000 (UTC)
commit 54c3592502566c6a8923ef9074d8b2266cb44f84
Author: Daniel Espinosa <esodan gmail com>
Date: Mon Mar 15 21:54:28 2021 -0600
Unit Tests: split GXml.Element tests
test/ElementTest.vala | 10 ++++++++--
test/GXmlDomTest.vala | 1 -
test/meson.build | 14 +++++++++++++-
3 files changed, 21 insertions(+), 4 deletions(-)
---
diff --git a/test/ElementTest.vala b/test/ElementTest.vala
index 297cf918..ba237961 100644
--- a/test/ElementTest.vala
+++ b/test/ElementTest.vala
@@ -66,7 +66,7 @@ class ObjectParent : GXml.Element {
}
}
-class GXml.ElementTest : GXmlTest {
+class ElementTest : GLib.Object {
public class ParsedDelayed : GXml.Element {
construct {
try { initialize ("root"); }
@@ -225,7 +225,8 @@ class GXml.ElementTest : GXmlTest {
initialize ("elementType");
}
}
- public static void add_tests () {
+ public static int main (string[] args) {
+ Test.init (ref args);
Test.add_func ("/gxml/element/read/namespace_uri", () => {
DomDocument doc = null;
try {
@@ -915,5 +916,10 @@ class GXml.ElementTest : GXmlTest {
GLib.warning ("Error: "+e.message);
}
});
+
+
+ Test.run ();
+
+ return 0;
}
}
diff --git a/test/GXmlDomTest.vala b/test/GXmlDomTest.vala
index e8fdb467..babaa38d 100644
--- a/test/GXmlDomTest.vala
+++ b/test/GXmlDomTest.vala
@@ -29,7 +29,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);
- ElementTest.add_tests ();
SerializationTest.add_tests ();
GomSchemaTest.add_tests ();
CssSelectorTest.add_tests ();
diff --git a/test/meson.build b/test/meson.build
index 0cfe08fe..40d7e11a 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -26,7 +26,6 @@ test ('libxml-tests', xt)
files_tests = files ([
'GXmlDomTest.vala',
'CssSelectorTest.vala',
- 'ElementTest.vala',
'SerializationTest.vala',
'XsdSchemaTest.vala',
])
@@ -53,6 +52,19 @@ tdocument = executable('document', files_document_tests + configvapi + configtes
test ('document', tdocument)
+files_element_tests = files ([
+ 'ElementTest.vala',
+ ])
+
+telement = executable('element', files_element_tests + configvapi + configtestvapi,
+ vala_args : [],
+ c_args: tests_cargs,
+ dependencies : [ libgxml_deps, inc_libh_dep, testdirs_dep, inc_rooth_dep],
+ link_with: libgxml
+)
+
+test ('element', telement)
+
html_tests = files ([
'HtmlDocumentTest.vala',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]