[gxml] GXmlTest.vala: add an error check for our boilerplate get_doc, print our test_error message to stder
- From: Richard Hans Schwarting <rschwart src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml] GXmlTest.vala: add an error check for our boilerplate get_doc, print our test_error message to stder
- Date: Mon, 14 Oct 2013 08:39:00 +0000 (UTC)
commit 497909947b910b2a79f5c7da93e661c537b4a8d8
Author: Richard Schwarting <aquarichy gmail com>
Date: Mon Oct 14 04:38:18 2013 -0400
GXmlTest.vala: add an error check for our boilerplate get_doc, print our test_error message to stderr
(Test.message doesn't seem to?)
test/GXmlTest.vala | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/test/GXmlTest.vala b/test/GXmlTest.vala
index e52aca4..4819a2f 100644
--- a/test/GXmlTest.vala
+++ b/test/GXmlTest.vala
@@ -8,6 +8,7 @@ class GXmlTest {
internal static void test_error (GXml.DomException expected) {
if (expected != GXml.last_error) {
+ stderr.printf ("Expected last error [%s] but found [%s]", expected.to_string (),
GXml.last_error.to_string ());
Test.message ("Expected last error [%s] but found [%s]", expected.to_string (),
GXml.last_error.to_string ());
Test.fail ();
}
@@ -44,7 +45,12 @@ class GXmlTest {
internal static Document get_doc () {
Document doc = null;
- doc = new Document.from_path (get_test_dir () + "/test.xml");
+ try {
+ doc = new Document.from_path (get_test_dir () + "/test.xml");
+ } catch (GXml.Error e) {
+ GLib.warning (e.message);
+ assert_not_reached ();
+ }
return doc;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]