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
5a26585e
Commit
5a26585e
authored
Oct 03, 2014
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(tests): добавил для UniXML::iterator операции --it, ++it
parent
95d5e8b5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
0 deletions
+18
-0
UniXML.h
include/UniXML.h
+2
-0
UniXML.cc
src/Various/UniXML.cc
+10
-0
unixml.cc
tests/unixml.cc
+6
-0
No files found.
include/UniXML.h
View file @
5a26585e
...
...
@@ -87,10 +87,12 @@ class UniXML_iterator:
UniXML_iterator
operator
+
(
int
);
UniXML_iterator
operator
++
(
int
);
UniXML_iterator
operator
+=
(
int
);
UniXML_iterator
operator
++
();
// Перейти к предыдущему узлу
UniXML_iterator
operator
-
(
int
);
UniXML_iterator
operator
--
(
int
);
UniXML_iterator
operator
--
();
UniXML_iterator
operator
-=
(
int
);
/*! Перейти на один уровень выше
...
...
src/Various/UniXML.cc
View file @
5a26585e
...
...
@@ -472,6 +472,11 @@ bool UniXML_iterator::find( const std::string& searchnode )
return
false
;
}
// -------------------------------------------------------------------------
UniXML_iterator
UniXML_iterator
::
operator
++
()
{
return
(
*
this
)
+
1
;
}
// -------------------------------------------------------------------------
UniXML_iterator
UniXML_iterator
::
operator
++
(
int
)
{
return
(
*
this
)
+
1
;
...
...
@@ -504,6 +509,11 @@ UniXML_iterator UniXML_iterator::operator--(int)
return
(
*
this
)
-
1
;
}
UniXML_iterator
UniXML_iterator
::
operator
--
()
{
return
(
*
this
)
-
1
;
}
UniXML_iterator
UniXML_iterator
::
operator
-=
(
int
s
)
{
return
(
*
this
)
-
s
;
...
...
tests/unixml.cc
View file @
5a26585e
...
...
@@ -73,6 +73,12 @@ TEST_CASE("UniXML", "[UniXML]" )
it
--
;
CHECK
(
it
.
getName
()
==
"UserData"
);
++
it
;
CHECK
(
it
.
getName
()
==
"UniSet"
);
--
it
;
CHECK
(
it
.
getName
()
==
"UserData"
);
it
=
uxml
.
begin
();
CHECK
(
it
.
findName
(
"TestNode"
,
"TestNode1"
)
!=
0
);
it
=
uxml
.
begin
();
...
...
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