Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
5a1f06ac
Commit
5a1f06ac
authored
Aug 13, 2009
by
Pavel Vaynerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new test: unixmltest
parent
deeab0b1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
1 deletion
+47
-1
Makefile.am
tests/Makefile.am
+7
-1
unixml.cc
tests/unixml.cc
+40
-0
No files found.
tests/Makefile.am
View file @
5a1f06ac
...
@@ -2,10 +2,16 @@
...
@@ -2,10 +2,16 @@
# This file is part of the UniSet library #
# This file is part of the UniSet library #
############################################################################
############################################################################
noinst_PROGRAMS
=
passivetimer
noinst_PROGRAMS
=
passivetimer unixml
passivetimer_SOURCES
=
passivetimer.cc
passivetimer_SOURCES
=
passivetimer.cc
passivetimer_LDADD
=
$(top_builddir)
/lib/libUniSet.la
passivetimer_LDADD
=
$(top_builddir)
/lib/libUniSet.la
passivetimer_CPPFLAGS
=
-I
$(top_builddir)
/include
passivetimer_CPPFLAGS
=
-I
$(top_builddir)
/include
unixml_SOURCES
=
unixml.cc
unixml_LDADD
=
$(top_builddir)
/lib/libUniSet.la
unixml_CPPFLAGS
=
-I
$(top_builddir)
/include
include
$(top_builddir)/conf/setting.mk
include
$(top_builddir)/conf/setting.mk
tests/unixml.cc
0 → 100644
View file @
5a1f06ac
#include <iostream>
using
namespace
std
;
#include "Exceptions.h"
#include "UniXML.h"
#include "UniSetTypes.h"
int
main
()
{
try
{
UniXML
xml
(
"test.xml"
);
xmlNode
*
cnode
=
xml
.
findNode
(
xml
.
getFirstNode
(),
"testnode"
);
if
(
!
cnode
)
{
cerr
<<
"<testnode> not found"
<<
endl
;
return
1
;
}
UniXML_iterator
it
(
cnode
);
cout
<<
"string id="
<<
it
.
getProp
(
"id"
)
<<
" int id="
<<
it
.
getIntProp
(
"id"
)
<<
endl
;
}
catch
(
UniSetTypes
::
Exception
&
ex
)
{
cerr
<<
ex
<<
endl
;
return
1
;
}
catch
(
...
)
{
cerr
<<
"catch ... "
<<
endl
;
return
1
;
}
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment