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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pycodegen
pystencils
Commits
63092811
Commit
63092811
authored
1 year ago
by
Frederik Hennig
Browse files
Options
Downloads
Patches
Plain Diff
removed accidentaly added file
parent
e439a228
No related branches found
No related tags found
No related merge requests found
Pipeline
#59717
failed
1 year ago
Stage: pretest
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
debug.py
+0
-26
0 additions, 26 deletions
debug.py
with
0 additions
and
26 deletions
debug.py
deleted
100644 → 0
+
0
−
26
View file @
e439a228
#%%
import
pytest
from
pystencils.nbackend.types.quick
import
*
def
test_parsing_positive
():
assert
make_type
(
"
const uint32_t * restrict
"
)
==
Ptr
(
UInt
(
32
,
const
=
True
),
restrict
=
True
)
assert
make_type
(
"
float * * const
"
)
==
Ptr
(
Ptr
(
Fp
(
32
)),
const
=
True
)
def
test_parsing_negative
():
bad_specs
=
[
"
const notatype * const
"
,
"
cnost uint32_t
"
,
"
int
"
,
# plain ints are ambiguous
"
float float
"
,
"
double * int
"
,
"
bool
"
]
for
spec
in
bad_specs
:
with
pytest
.
raises
(
ValueError
):
make_type
(
spec
)
#%%
test_parsing_positive
()
\ No newline at end of file
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