Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Gxml
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Canek Peláez Valdés
Gxml
Commits
3235ebee
Commit
3235ebee
authored
8 years ago
by
Daniel Espinosa
Browse files
Options
Downloads
Patches
Plain Diff
GomSerialization: Intial Unit Tests
parent
57ba15fc
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
test/GXmlTest.vala
+1
-0
1 addition, 0 deletions
test/GXmlTest.vala
test/GomSerializationTest.vala
+41
-0
41 additions, 0 deletions
test/GomSerializationTest.vala
test/Makefile.am
+1
-0
1 addition, 0 deletions
test/Makefile.am
with
43 additions
and
0 deletions
test/GXmlTest.vala
+
1
−
0
View file @
3235ebee
...
...
@@ -63,6 +63,7 @@ class GXmlTest {
XPathTest
.
add_tests
();
GomDocumentTest
.
add_tests
();
GomElementTest
.
add_tests
();
GomSerializationTest
.
add_tests
();
Test
.
run
();
...
...
This diff is collapsed.
Click to expand it.
test/GomSerializationTest.vala
0 → 100644
+
41
−
0
View file @
3235ebee
/* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 2 -*- */
/* Notation.vala
*
* Copyright (C) 2016 Daniel Espinosa <esodan@gmail.com>
*
* 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 <http://www.gnu.org/licenses/>.
*
* Authors:
* Daniel Espinosa <esodan@gmail.com>
*/
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
());
});
}
}
This diff is collapsed.
Click to expand it.
test/Makefile.am
+
1
−
0
View file @
3235ebee
...
...
@@ -60,6 +60,7 @@ sources = \
XPathTest.vala
\
GomDocumentTest.vala
\
GomElementTest.vala
\
GomSerializationTest.vala
\
$(
NULL
)
vala-stamp
:
$(sources)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment