[gxml] Added DEBUG definition on Unit Test
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml] Added DEBUG definition on Unit Test
- Date: Thu, 7 May 2015 12:02:37 +0000 (UTC)
commit 29cffca3d93d0eee942fe8941a62f4a390f30e09
Author: Daniel Espinosa <esodan gmail com>
Date: Tue May 5 16:50:55 2015 -0500
Added DEBUG definition on Unit Test
test/Makefile.am | 4 ++++
test/SerializableObjectModelTest.vala | 4 ++--
test/TwDocumentTest.vala | 2 ++
3 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/test/Makefile.am b/test/Makefile.am
index bf504d1..1501996 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -72,6 +72,10 @@ AM_VALAFLAGS = \
-X -DTEST_DIR=$(top_srcdir)/test \
$(NULL)
+if DEBUG
+AM_VALAFLAGS+= -D DEBUG
+endif
+
gxml_test_LDADD = \
$(AM_LDADD) \
$(GLIB_LIBS) \
diff --git a/test/SerializableObjectModelTest.vala b/test/SerializableObjectModelTest.vala
index be6b324..a8a6f67 100644
--- a/test/SerializableObjectModelTest.vala
+++ b/test/SerializableObjectModelTest.vala
@@ -757,8 +757,8 @@ class SerializableObjectModelTest : GXmlTest
if (configuration.invalid == true) {
#if DEBUG
stdout.printf ("CONFIGURATION: deserialize is INVALID\n");
- foreach (GXml.xNode n in doc.document_element.namespace_definitions) {
- stdout.printf (@"CONFIGURATION: namespace: $(n.node_value)\n");
+ foreach (GXml.Namespace n in doc.document_element.namespace_definitions) {
+ stdout.printf (@"CONFIGURATION: namespace: $(n.uri)\n");
}
#endif
assert_not_reached ();
diff --git a/test/TwDocumentTest.vala b/test/TwDocumentTest.vala
index 93e1c82..43e7bd8 100644
--- a/test/TwDocumentTest.vala
+++ b/test/TwDocumentTest.vala
@@ -296,7 +296,9 @@ class TwDocumentTest : GXmlTest {
assert ("<Author>" in ((string)buffer));
}
catch (GLib.Error e) {
+#if DEBUG
GLib.message (@"ERROR: $(e.message)");
+#endif
assert_not_reached ();
}
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]