Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pystencils
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
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pycodegen
pystencils
Commits
679bf618
Commit
679bf618
authored
Jan 15, 2024
by
Frederik Hennig
Browse files
Options
Downloads
Patches
Plain Diff
extend printing test
parent
e12bef27
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
pystencils/nbackend/c_printer.py
+1
-1
1 addition, 1 deletion
pystencils/nbackend/c_printer.py
pystencils_tests/nbackend/test_basic_printing.py
+6
-1
6 additions, 1 deletion
pystencils_tests/nbackend/test_basic_printing.py
with
7 additions
and
2 deletions
pystencils/nbackend/c_printer.py
+
1
−
1
View file @
679bf618
This diff is collapsed.
Click to expand it.
pystencils_tests/nbackend/test_basic_printing.py
+
6
−
1
View file @
679bf618
...
@@ -34,5 +34,10 @@ def test_basic_kernel():
...
@@ -34,5 +34,10 @@ def test_basic_kernel():
printer
=
CPrinter
()
printer
=
CPrinter
()
code
=
printer
.
print
(
func
)
code
=
printer
.
print
(
func
)
assert
code
.
find
(
"
u_data[ctr] = u_data[ctr + 1] + u_data[ctr - 1]
"
)
>=
0
paramlist
=
func
.
get_parameters
()
params_str
=
"
,
"
.
join
(
f
"
{
p
.
dtype
}
{
p
.
name
}
"
for
p
in
paramlist
)
assert
code
.
find
(
"
(
"
+
params_str
+
"
)
"
)
>=
0
assert
code
.
find
(
"
u_data[ctr] = u_data[ctr - 1] + u_data[ctr + 1];
"
)
>=
0
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
sign in
to comment