[gxml/gxml-0.20] Unit Tests: split XPath tests
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml/gxml-0.20] Unit Tests: split XPath tests
- Date: Mon, 23 Aug 2021 03:06:43 +0000 (UTC)
commit 504945b11ded87c941be7f435c67cdf35fdac125
Author: Daniel Espinosa <esodan gmail com>
Date: Wed Mar 17 13:38:03 2021 -0600
Unit Tests: split XPath tests
test/GXmlTest.vala | 39 ---------------------------------------
test/ValaLibxml2Test.vala | 40 ----------------------------------------
test/XPathTest.vala | 9 +++++++--
test/meson.build | 28 +++++++++++++---------------
4 files changed, 20 insertions(+), 96 deletions(-)
---
diff --git a/test/XPathTest.vala b/test/XPathTest.vala
index 187754c0..7e9038ca 100644
--- a/test/XPathTest.vala
+++ b/test/XPathTest.vala
@@ -24,10 +24,11 @@
using GXml;
-class XPathTest : GXmlTest {
+class XPathTest : GLib.Object {
// Taken from:
const string BOOKS = """<bookstore><book category="COOKING"><title lang="en">Everyday
Italian</title><author>Giada De Laurentiis</author><year>2005</year><price>30.00</price></book><book
category="CHILDREN"><title lang="en">Harry Potter</title><author>J K.
Rowling</author><year>2005</year><price>29.99</price></book><book category="WEB"><title lang="en">XQuery Kick
Start</title><author>James McGovern</author><author>Per Bothner</author><author>Kurt
Cagle</author><author>James Linn</author><author>Vaidyanathan
Nagarajan</author><year>2003</year><price>49.99</price></book><book category="WEB"><title lang="en">Learning
XML</title><author>Erik T. Ray</author><year>2003</year><price>39.95</price></book></bookstore>""";
- public static void add_tests () {
+ public static int main (string[] args) {
+ Test.init (ref args);
Test.add_func ("/gxml/gelement/xpath", () => {
try {
DomDocument document = null;
@@ -69,5 +70,9 @@ class XPathTest : GXmlTest {
assert_not_reached ();
}
});
+
+ Test.run ();
+
+ return 0;
}
}
diff --git a/test/meson.build b/test/meson.build
index 682229b1..2007bbeb 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -3,23 +3,8 @@ testdirs_dep = declare_dependency (compile_args : [
'-DTEST_SAVE_DIR="'+meson.current_build_dir()+'"',
])
-files_xtests = files ([
- 'GXmlTest.vala',
- 'ValaLibxml2Test.vala',
- 'XPathTest.vala',
- ])
-
tests_cargs = []
-xt = executable('libxml-tests', files_xtests + configvapi + configtestvapi,
- vala_args : [],
- c_args: tests_cargs,
- dependencies : [ libgxml_deps, inc_libh_dep, testdirs_dep, inc_rooth_dep],
- link_with: libgxml
-)
-
-test ('libxml-tests', xt)
-
files_xdomdoc = files ([
'DomXDocumentTest.vala',
])
@@ -59,6 +44,19 @@ txelement = executable('xelement', files_xelement + configvapi + configtestvapi,
test ('xelement', txelement)
+files_xxpath = files ([
+ 'XPathTest.vala',
+ ])
+
+txxpath = executable('xxpath', files_xxpath + configvapi + configtestvapi,
+ vala_args : [],
+ c_args: tests_cargs,
+ dependencies : [ libgxml_deps, inc_libh_dep, testdirs_dep, inc_rooth_dep],
+ link_with: libgxml
+)
+
+test ('xxpath', txxpath)
+
files_xsd_tests = files ([
'XsdSchemaTest.vala',
])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]