Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
71409b56
Commit
71409b56
authored
Jan 15, 2021
by
Ralf W. Grosse-Kunstleve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cosmetical change around helper functions.
parent
07ed8aaa
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
tests/test_classh_wip.cpp
+5
-3
No files found.
tests/test_classh_wip.cpp
View file @
71409b56
...
@@ -42,7 +42,9 @@ std::string pass_mpty_uqcp(std::unique_ptr<mpty const> obj) { return "pass_uqcp:
...
@@ -42,7 +42,9 @@ std::string pass_mpty_uqcp(std::unique_ptr<mpty const> obj) { return "pass_uqcp:
// clang-format on
// clang-format on
// Helpers for testing.
std
::
string
get_mtxt
(
mpty
const
&
obj
)
{
return
obj
.
mtxt
;
}
std
::
string
get_mtxt
(
mpty
const
&
obj
)
{
return
obj
.
mtxt
;
}
std
::
unique_ptr
<
mpty
>
unique_ptr_roundtrip
(
std
::
unique_ptr
<
mpty
>
obj
)
{
return
obj
;
}
}
// namespace classh_wip
}
// namespace classh_wip
}
// namespace pybind11_tests
}
// namespace pybind11_tests
...
@@ -478,10 +480,10 @@ TEST_SUBMODULE(classh_wip, m) {
...
@@ -478,10 +480,10 @@ TEST_SUBMODULE(classh_wip, m) {
m
.
def
(
"pass_mpty_uqmp"
,
pass_mpty_uqmp
);
m
.
def
(
"pass_mpty_uqmp"
,
pass_mpty_uqmp
);
m
.
def
(
"pass_mpty_uqcp"
,
pass_mpty_uqcp
);
m
.
def
(
"pass_mpty_uqcp"
,
pass_mpty_uqcp
);
// Helpers, these require selected functions above to work, as indicated:
// Helpers for testing.
// These require selected functions above to work first, as indicated:
m
.
def
(
"get_mtxt"
,
get_mtxt
);
// pass_mpty_cref
m
.
def
(
"get_mtxt"
,
get_mtxt
);
// pass_mpty_cref
m
.
def
(
"unique_ptr_roundtrip"
,
m
.
def
(
"unique_ptr_roundtrip"
,
unique_ptr_roundtrip
);
// pass_mpty_uqmp, rtrn_mpty_uqmp
[](
std
::
unique_ptr
<
mpty
>
obj
)
{
return
obj
;
});
// pass_mpty_uqmp, rtrn_mpty_uqmp
}
}
}
// namespace classh_wip
}
// namespace classh_wip
...
...
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