Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
json
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
json
Commits
82fbbeea
Commit
82fbbeea
authored
Jun 06, 2020
by
Guillaume Racicot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adapted unit tests to use ADL calls for swap like the new swappable concept
parent
225c8f15
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
test/src/unit-concepts.cpp
test/src/unit-concepts.cpp
+2
-2
test/src/unit-modifiers.cpp
test/src/unit-modifiers.cpp
+2
-1
No files found.
test/src/unit-concepts.cpp
View file @
82fbbeea
...
@@ -154,7 +154,7 @@ TEST_CASE("concepts")
...
@@ -154,7 +154,7 @@ TEST_CASE("concepts")
json
j
{
1
,
2
,
3
};
json
j
{
1
,
2
,
3
};
json
::
iterator
it1
=
j
.
begin
();
json
::
iterator
it1
=
j
.
begin
();
json
::
iterator
it2
=
j
.
end
();
json
::
iterator
it2
=
j
.
end
();
s
td
::
s
wap
(
it1
,
it2
);
swap
(
it1
,
it2
);
CHECK
(
it1
==
j
.
end
());
CHECK
(
it1
==
j
.
end
());
CHECK
(
it2
==
j
.
begin
());
CHECK
(
it2
==
j
.
begin
());
}
}
...
@@ -162,7 +162,7 @@ TEST_CASE("concepts")
...
@@ -162,7 +162,7 @@ TEST_CASE("concepts")
json
j
{
1
,
2
,
3
};
json
j
{
1
,
2
,
3
};
json
::
const_iterator
it1
=
j
.
cbegin
();
json
::
const_iterator
it1
=
j
.
cbegin
();
json
::
const_iterator
it2
=
j
.
cend
();
json
::
const_iterator
it2
=
j
.
cend
();
s
td
::
s
wap
(
it1
,
it2
);
swap
(
it1
,
it2
);
CHECK
(
it1
==
j
.
end
());
CHECK
(
it1
==
j
.
end
());
CHECK
(
it2
==
j
.
begin
());
CHECK
(
it2
==
j
.
begin
());
}
}
...
...
test/src/unit-modifiers.cpp
View file @
82fbbeea
...
@@ -878,7 +878,8 @@ TEST_CASE("modifiers")
...
@@ -878,7 +878,8 @@ TEST_CASE("modifiers")
json
j
(
"hello world"
);
json
j
(
"hello world"
);
json
k
(
42.23
);
json
k
(
42.23
);
std
::
swap
(
j
,
k
);
using
std
::
swap
;
swap
(
j
,
k
);
CHECK
(
j
==
json
(
42.23
));
CHECK
(
j
==
json
(
42.23
));
CHECK
(
k
==
json
(
"hello world"
));
CHECK
(
k
==
json
(
"hello world"
));
...
...
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