diff --git a/test/GXmlTest.vala b/test/GXmlTest.vala index c0305cef281af58a4e84a2f32a62631fc2e35a45..88c97e6f3e2d8a6ad747ce066103bcfa65aa9a8f 100644 --- a/test/GXmlTest.vala +++ b/test/GXmlTest.vala @@ -63,6 +63,7 @@ class GXmlTest { XPathTest.add_tests (); GomDocumentTest.add_tests (); GomElementTest.add_tests (); + GomSerializationTest.add_tests (); Test.run (); diff --git a/test/GomSerializationTest.vala b/test/GomSerializationTest.vala new file mode 100644 index 0000000000000000000000000000000000000000..cd1a43ead8cc397a36bfaefc432deaa25c8d2fd6 --- /dev/null +++ b/test/GomSerializationTest.vala @@ -0,0 +1,41 @@ +/* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 2 -*- */ +/* Notation.vala + * + * Copyright (C) 2016 Daniel Espinosa + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + * + * Authors: + * Daniel Espinosa + */ + +using GXml; + +class GomSerializationTest : GXmlTest { + public class Book : GomElement { + public string name { get; set; } + public Book () { + var d = new GomDocument (); + base (d, "Book"); + d.append_child (this); + } + public string to_string () { return (_document as GomDocument).to_string (); } + } + public static void add_tests () { + Test.add_func ("/gxml/gom-serialization/write", () => { + var b = new Book (); + GLib.message ("DOC:"+b.to_string ()); + }); + } +} diff --git a/test/Makefile.am b/test/Makefile.am index 0344d877a04524dec0a56ee8a24956f09ae375e6..8cfcde26eb0890236f6b98bd179b9c746bdb587d 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -60,6 +60,7 @@ sources = \ XPathTest.vala \ GomDocumentTest.vala \ GomElementTest.vala \ + GomSerializationTest.vala \ $(NULL) vala-stamp: $(sources)