[gxml/gxml-0.20] Unit Tests: split tests for GXml.Document
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml/gxml-0.20] Unit Tests: split tests for GXml.Document
- Date: Mon, 23 Aug 2021 03:06:43 +0000 (UTC)
commit ea1b2bf6597494f36d94401ad03c76fdb27ebe41
Author: Daniel Espinosa <esodan gmail com>
Date: Mon Mar 15 21:45:28 2021 -0600
Unit Tests: split tests for GXml.Document
test/DocumentTest.vala | 14 ++++++++++++--
test/GXmlDomTest.vala | 1 -
test/meson.build | 16 ++++++++++++++--
3 files changed, 26 insertions(+), 5 deletions(-)
---
diff --git a/test/DocumentTest.vala b/test/DocumentTest.vala
index 95d336e4..9008677a 100644
--- a/test/DocumentTest.vala
+++ b/test/DocumentTest.vala
@@ -22,7 +22,7 @@
using GXml;
-class GXml.DocumentTest : GXmlTest {
+class DocumentTest : GLib.Object {
class ObjectDocument : GXml.Document {
[Description (nick="::ROOT")]
public ObjectParent root_element { get; set; }
@@ -55,7 +55,12 @@ class GXml.DocumentTest : GXmlTest {
}
}
}
- public static void add_tests () {
+
+ public static int main (string[] args) {
+
+
+ // 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);
Test.add_func ("/gxml/gom-document/construct_api", () => {
try {
DomDocument d = new GXml.Document ();
@@ -775,5 +780,10 @@ class GXml.DocumentTest : GXmlTest {
assert_not_reached ();
} //<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
});
+
+
+ Test.run ();
+
+ return 0;
}
}
diff --git a/test/GXmlDomTest.vala b/test/GXmlDomTest.vala
index afd9c8ee..e8fdb467 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);
- DocumentTest.add_tests ();
ElementTest.add_tests ();
SerializationTest.add_tests ();
GomSchemaTest.add_tests ();
diff --git a/test/meson.build b/test/meson.build
index c0722165..0cfe08fe 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -26,13 +26,12 @@ test ('libxml-tests', xt)
files_tests = files ([
'GXmlDomTest.vala',
'CssSelectorTest.vala',
- 'DocumentTest.vala',
'ElementTest.vala',
'SerializationTest.vala',
'XsdSchemaTest.vala',
])
-t = executable('tests', files_tests + configvapi + configtestvapi,
+t = executable('dom-tests', files_tests + configvapi + configtestvapi,
vala_args : [],
c_args: tests_cargs,
dependencies : [ libgxml_deps, inc_libh_dep, testdirs_dep, inc_rooth_dep],
@@ -41,6 +40,19 @@ t = executable('tests', files_tests + configvapi + configtestvapi,
test ('dom-tests', t)
+files_document_tests = files ([
+ 'DocumentTest.vala',
+ ])
+
+tdocument = executable('document', files_document_tests + configvapi + configtestvapi,
+ vala_args : [],
+ c_args: tests_cargs,
+ dependencies : [ libgxml_deps, inc_libh_dep, testdirs_dep, inc_rooth_dep],
+ link_with: libgxml
+)
+
+test ('document', tdocument)
+
html_tests = files ([
'HtmlDocumentTest.vala',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]