Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
KDevelop
KDevelop Python Support
Commits
cbc30d56
Commit
cbc30d56
authored
Oct 26, 2022
by
frmdstryr
Committed by
Sven Brauch
Nov 05, 2022
Browse files
Add match class test
parent
0536fc67
Changes
1
Hide whitespace changes
Inline
Side-by-side
parser/tests/pyasttest.cpp
View file @
cbc30d56
...
...
@@ -163,7 +163,7 @@ void PyAstTest::testStatements_data()
QTest
::
newRow
(
"match_sequence"
)
<<
"match x:
\n
case [a, b]:
\n
pass"
;
QTest
::
newRow
(
"match_mapping"
)
<<
"match x:
\n
case {'type': 'update'}:
\n
pass"
;
// TODO: Mapping rest
// TODO: Class
QTest
::
newRow
(
"match_class"
)
<<
"class Node:
\n
__match_args__=('type',)
\n
type=1
\n
match x:
\n
case Node():
\n
pass"
;
QTest
::
newRow
(
"match_star"
)
<<
"match x:
\n
case [a, b, *c]:
\n
pass"
;
QTest
::
newRow
(
"match_as"
)
<<
"match x:
\n
case a:
\n
pass"
;
QTest
::
newRow
(
"match_as_empty"
)
<<
"match x:
\n
case _:
\n
pass"
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment