[gxml] Added unit tests for GCharacterData implemenation of DomCharacterData
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml] Added unit tests for GCharacterData implemenation of DomCharacterData
- Date: Fri, 22 Jul 2016 00:20:31 +0000 (UTC)
commit 63390275b4f99533cc9214f956df239c2c360da1
Author: Daniel Espinosa <esodan gmail com>
Date: Thu Jul 21 19:18:15 2016 -0500
Added unit tests for GCharacterData implemenation of DomCharacterData
* Added tests for append_data(), delete_data(), insert_data() and
replace_data()
test/DomGDocumentTest.vala | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/test/DomGDocumentTest.vala b/test/DomGDocumentTest.vala
index 48e3264..b5dce9d 100644
--- a/test/DomGDocumentTest.vala
+++ b/test/DomGDocumentTest.vala
@@ -500,10 +500,16 @@ static const string XMLDOC ="<?xml version=\"1.0\"?>
catch {}
t.append_data (" HI");
assert (t.data == "TEXT HI");
- GLib.message ("t = "+t.substring_data (0, 4));
t.replace_data (0, 4, "");
- GLib.message ("Text:'"+t.data+"'");
assert (t.data == " HI");
+ t.insert_data (0, "TEXT");
+ assert (t.data == "TEXT HI");
+ t.delete_data (0, 4);
+ assert (t.data == " HI");
+ t.insert_data (0, "TEXT");
+ assert (t.data == "TEXT HI");
+ t.replace_data (0, 4, "text");
+ assert (t.data == "text HI");
} catch (GLib.Error e) {
GLib.message ("Error: "+ e.message);
assert_not_reached ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]