Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pystencils-sfg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pycodegen
pystencils-sfg
Commits
e996d33d
Commit
e996d33d
authored
4 months ago
by
Frederik Hennig
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into fhennig/cmake-config-module-param
parents
bf9e148d
7de3cd0b
No related branches found
No related tags found
1 merge request
!8
Add CONFIG_MODULE parameter to CMake function. Add Tests for CMake Integration.
Pipeline
#71512
failed
4 months ago
Stage: Code Quality
Stage: Tests
Stage: Documentation
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/pystencilssfg/lang/headers.py
+3
-0
3 additions, 0 deletions
src/pystencilssfg/lang/headers.py
tests/lang/test_headers.py
+13
-0
13 additions, 0 deletions
tests/lang/test_headers.py
with
16 additions
and
0 deletions
src/pystencilssfg/lang/headers.py
+
3
−
0
View file @
e996d33d
...
@@ -24,6 +24,9 @@ class HeaderFile:
...
@@ -24,6 +24,9 @@ class HeaderFile:
return
header
return
header
system_header
=
False
system_header
=
False
if
header
.
startswith
(
'"'
)
and
header
.
endswith
(
'"'
):
header
=
header
[
1
:
-
1
]
if
header
.
startswith
(
"
<
"
)
and
header
.
endswith
(
"
>
"
):
if
header
.
startswith
(
"
<
"
)
and
header
.
endswith
(
"
>
"
):
header
=
header
[
1
:
-
1
]
header
=
header
[
1
:
-
1
]
system_header
=
True
system_header
=
True
...
...
This diff is collapsed.
Click to expand it.
tests/lang/test_headers.py
0 → 100644
+
13
−
0
View file @
e996d33d
from
pystencilssfg.lang
import
HeaderFile
import
pytest
def
test_parse_system
():
headerfile
=
HeaderFile
.
parse
(
"
<test>
"
)
assert
str
(
headerfile
)
==
"
<test>
"
and
headerfile
.
system_header
@pytest.mark.parametrize
(
"
header_string
"
,
[
"
test.hpp
"
,
'"
test.hpp
"'
])
def
test_parse_private
(
header_string
):
headerfile
=
HeaderFile
.
parse
(
header_string
)
assert
str
(
headerfile
)
==
"
test.hpp
"
and
not
headerfile
.
system_header
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment