[gxml/gxml-0.20] Modify test source code to find memeory leaks



commit ee9e6a8b009739f1e4e88ab4d0c2bacac6de543f
Author: Daniel Espinosa <esodan gmail com>
Date:   Wed Mar 17 19:51:59 2021 -0600

    Modify test source code to find memeory leaks

 test/XElementTest.vala | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/test/XElementTest.vala b/test/XElementTest.vala
index c23ea170..9cc9cfba 100644
--- a/test/XElementTest.vala
+++ b/test/XElementTest.vala
@@ -50,10 +50,14 @@ class XElementTest : GLib.Object  {
                                assert (doc.document_element != null);
                                assert (doc.document_element.parent_node is GXml.DomNode);
                                assert (doc.document_element.parent_node is GXml.DomDocument);
-                               assert (doc.document_element.child_nodes[0] != null);
-                               assert (doc.document_element.child_nodes[0].parent_node != null);
-                               assert (doc.document_element.child_nodes[0].parent_node.node_name == "root");
-                               assert (doc.document_element.child_nodes[0] is DomText);
+                               var n0 = doc.document_element.child_nodes[0];
+                               assert (n0 != null);
+                               assert (n0.parent_node != null);
+                               string n = n0.parent_node.node_name;
+                               assert (n != null);
+                               assert (n == "root");
+                               assert (n0 is DomText);
+                               // BUG: This is failing under Vala 0.48.6 and address sanitized
                                assert (doc.document_element.child_nodes[1] != null);
                                assert (doc.document_element.child_nodes[1] is DomElement);
                                assert (doc.document_element.child_nodes[1].node_name == "child");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]