[gxml] Minor improvements to performance tests



commit b6bb3e04e8c325916d5429dc864130cb5c0df0f7
Author: Daniel Espinosa <esodan gmail com>
Date:   Mon Dec 12 23:22:14 2016 -0600

    Minor improvements to performance tests
    
    Needs to test implementation of De/Serialization

 test/gxml-performance-graph.ods |  Bin 21973 -> 22609 bytes
 test/gxml-performance.vala      |   14 ++++++++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/test/gxml-performance-graph.ods b/test/gxml-performance-graph.ods
index 9a7540b..83a48b9 100644
Binary files a/test/gxml-performance-graph.ods and b/test/gxml-performance-graph.ods differ
diff --git a/test/gxml-performance.vala b/test/gxml-performance.vala
index e1f7055..0752494 100644
--- a/test/gxml-performance.vala
+++ b/test/gxml-performance.vala
@@ -231,6 +231,9 @@ class GomBook : GomElement
 
 class GomBookStore : GomElement
 {
+  construct {
+    _local_name = "BookStore";
+  }
   [Description (nick="##name")]
   public string name { get; set; }
   public GomBook.Array books { get; set; default = new GomBook.Array (); }
@@ -411,6 +414,17 @@ public class Performance
         Test.minimized_result (time, "Serialize/performance: %g seconds", time);
         assert (of.query_exists ());
         try { of.delete (); } catch { assert_not_reached (); }
+        // Check read structure
+        GLib.message ("Document Root: "+bs.owner_document.document_element.node_name);
+        assert (bs.owner_document.document_element.node_name.down () == "bookstore");
+        assert (bs.child_nodes.length > 0);
+        var ns = bs.get_elements_by_tag_name ("book");
+        assert (ns.length > 0);
+        GLib.message ("Books: "+bs.books.length.to_string ());
+        /*assert (bs.books.length > 0);
+        var b = bs.books.get_item (0) as GomBook;
+        assert (b != null);
+        assert (b.year == "2015");*/
       } catch (GLib.Error e) {
 #if DEBUG
         GLib.message ("ERROR: "+e.message);


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