[gxml/newattr] test/SerializableTest.vala, SerializationTest.vala: update test expectations because GXmlSerializatio
- From: Richard Hans Schwarting <rschwart src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml/newattr] test/SerializableTest.vala, SerializationTest.vala: update test expectations because GXmlSerializatio
- Date: Wed, 23 Oct 2013 07:01:19 +0000 (UTC)
commit 8c29aff9726d6ff6244b2167547f57615d36cffc
Author: Richard Schwarting <aquarichy gmail com>
Date: Wed Oct 23 03:00:42 2013 -0400
test/SerializableTest.vala,SerializationTest.vala: update test expectations because GXmlSerialization now
returns Documents, not just Nodes (since our change in the memory model)
test/SerializableTest.vala | 2 +-
test/SerializationTest.vala | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/test/SerializableTest.vala b/test/SerializableTest.vala
index 9377dee..be3edaf 100644
--- a/test/SerializableTest.vala
+++ b/test/SerializableTest.vala
@@ -256,7 +256,7 @@ class SerializableTest : GXmlTest {
assert_not_reached ();
}
- expectation = "<Object otype=\"SerializableCapsicum\"
oid=\"0x[0-9a-f]+\"><Property pname=\"height\" ptype=\"gint\">6</Property><Property pname=\"ratings\"
ptype=\"gpointer\"><rating>8</rating><rating>13</rating><rating>21</rating></Property></Object>";
+ expectation = "<\\?xml version=\"1.0\"\\?>\n<Object
otype=\"SerializableCapsicum\" oid=\"0x[0-9a-f]+\"><Property ptype=\"gint\"
pname=\"height\">6</Property><Property ptype=\"gpointer\"
pname=\"ratings\"><rating>8</rating><rating>13</rating><rating>21</rating></Property></Object>";
try {
regex = new Regex (expectation);
diff --git a/test/SerializationTest.vala b/test/SerializationTest.vala
index 00c00b3..da4accc 100644
--- a/test/SerializationTest.vala
+++ b/test/SerializationTest.vala
@@ -300,7 +300,7 @@ class SerializationTest : GXmlTest {
/* TODO: This test should change once we can serialise fields
and private properties */
- expectation = "<Object otype=\"Fruit\" oid=\"0x[0-9a-f]+\"><Property
pname=\"age\" ptype=\"gint\">9</Property></Object>";
+ expectation = "<\\?xml version=\"1.0\"\\?>\n<Object otype=\"Fruit\"
oid=\"0x[0-9a-f]+\"><Property( pname=\"age\"| ptype=\"gint\")+>9</Property></Object>";
fruit = new Fruit ();
fruit.name = "fish";
@@ -311,6 +311,7 @@ class SerializationTest : GXmlTest {
regex = new Regex (expectation);
if (! regex.match (fruit_xml.to_string ())) {
+ // TODO: how does Test.message work? Nothing ever seems to
show up in the test report!
Test.message ("Expected [%s] but found [%s]",
expectation, fruit_xml.to_string ());
assert_not_reached ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]