[gxml/gxml-0.20] Unit Tests: split HTML XDcoument tests
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml/gxml-0.20] Unit Tests: split HTML XDcoument tests
- Date: Mon, 23 Aug 2021 03:06:43 +0000 (UTC)
commit e7bd682360e9416878e4b7a9ae40732df470b7ae
Author: Daniel Espinosa <esodan gmail com>
Date: Wed Mar 17 13:18:37 2021 -0600
Unit Tests: split HTML XDcoument tests
test/GXmlTest.vala | 1 -
test/XHtmlDocumentTest.vala | 9 +++++++--
test/meson.build | 15 +++++++++++++--
3 files changed, 20 insertions(+), 5 deletions(-)
---
diff --git a/test/GXmlTest.vala b/test/GXmlTest.vala
index e96a864c..2e11d982 100644
--- a/test/GXmlTest.vala
+++ b/test/GXmlTest.vala
@@ -31,7 +31,6 @@ class GXmlTest {
Test.init (ref args);
ValaLibxml2Test.add_tests ();
XElementTest.add_tests ();
- XHtmlDocumentTest.add_tests ();
XPathTest.add_tests ();
Test.run ();
diff --git a/test/XHtmlDocumentTest.vala b/test/XHtmlDocumentTest.vala
index 788be211..58e284fd 100644
--- a/test/XHtmlDocumentTest.vala
+++ b/test/XHtmlDocumentTest.vala
@@ -24,8 +24,9 @@
using GXml;
-class XHtmlDocumentTest : GXmlTest {
- public static void add_tests () {
+class XHtmlDocumentTest : GLib.Object {
+ public static int main (string[] args) {
+ Test.init (ref args);
Test.add_func ("/gxml/XHtmlDocument/api/element_id", () => {
try {
var doc = new XHtmlDocument.from_path (GXmlTestConfig.TEST_DIR+"/index.html");
@@ -1524,5 +1525,9 @@ var _analytics_elem = document.getElementsByTagName('script')[0]; _analytics_ele
}
});
+ Test.run ();
+
+ return 0;
+
}
}
diff --git a/test/meson.build b/test/meson.build
index 2cc306a0..67ff1c42 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',
- 'XHtmlDocumentTest.vala',
'XElementTest.vala',
'XPathTest.vala',
])
@@ -26,7 +25,6 @@ files_xdomdoc = files ([
'DomXDocumentTest.vala',
])
-
xtdomdoc = executable('domxdocument', files_xdomdoc + configvapi + configtestvapi,
vala_args : [],
c_args: tests_cargs,
@@ -36,6 +34,19 @@ xtdomdoc = executable('domxdocument', files_xdomdoc + configvapi + configtestvap
test ('domxdocument', xtdomdoc)
+files_xhtmldoc = files ([
+ 'XHtmlDocumentTest.vala',
+ ])
+
+xthtmldoc = executable('htmlxdocument', files_xhtmldoc + configvapi + configtestvapi,
+ vala_args : [],
+ c_args: tests_cargs,
+ dependencies : [ libgxml_deps, inc_libh_dep, testdirs_dep, inc_rooth_dep],
+ link_with: libgxml
+)
+
+test ('htmlxdocument', xthtmldoc)
+
files_xsd_tests = files ([
'XsdSchemaTest.vala',
])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]