Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
autopybind11
autopybind11
Commits
ac3d2db8
Commit
ac3d2db8
authored
Jun 09, 2021
by
John Parent
Browse files
Forward decl test
parent
f14721ad
Pipeline
#232643
failed with stages
in 18 minutes and 32 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Tests/forward_decls/datum.h
View file @
ac3d2db8
...
...
@@ -7,12 +7,6 @@
// Could clearly be solved by an include here, not in all cases.
class
Type
;
template
<
typename
T
>
class
Stump
{
};
class
Datum
{
public:
...
...
@@ -23,7 +17,4 @@ private:
Type
*
l
;
};
template
<
typename
T
>
void
stumpy
(
Stump
<
T
>
a
)
{}
#endif // DATUM
Tests/forward_decls/forward_decls.py
View file @
ac3d2db8
import
unittest
import
sys
from
datamod
import
Type
,
Datum
class
TestForwardDeclHandle
(
unittest
.
TestCase
):
def
test_type
(
self
):
t
=
Type
()
self
.
assertEqual
(
t
.
i
,
10
)
def
test_Datum
(
self
):
t
=
Type
()
d
=
Datum
()
d
.
set_type
(
t
)
self
.
assertEqual
(
d
.
get_type
().
i
,
10
)
if
__name__
==
"__main__"
:
unittest
.
main
()
Tests/forward_decls/type.h
View file @
ac3d2db8
...
...
@@ -4,7 +4,8 @@
class
Type
{
public:
Type
()
{}
Type
()
{
this
->
i
=
10
;}
int
i
;
};
...
...
Tests/forward_decls/wrap.yml
View file @
ac3d2db8
...
...
@@ -2,14 +2,6 @@ files:
datum.h
:
classes
:
Datum
:
Stump
:
inst
:
-
int
-
float
functions
:
stumpy
:
inst
:
-
int
type.h
:
classes
:
Type
:
\ No newline at end of file
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