diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index cb12809..68bdd86 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -39,7 +39,7 @@ jobs: strategy: matrix: os: [windows-latest, macos-latest, ubuntu-18.04] - python_version: [3.6, 3.7, 3.8, 3.9] + python_version: [3.6, 3.7, 3.8, 3.9, "3.10"] architecture: [x86, x64] exclude: - os: macos-latest diff --git a/tests/test_class.py b/tests/test_class.py index f71f6e1..a932589 100644 --- a/tests/test_class.py +++ b/tests/test_class.py @@ -2958,3 +2958,43 @@ def test_class_volatile(): ] ) ) + + +def test_class_mutable(): + content = """ + class Foo + { + private: + + mutable volatile Standard_Integer myRefCount_; + + }; + """ + data = parse_string(content, cleandoc=True) + + assert data == ParsedData( + namespace=NamespaceScope( + classes=[ + ClassScope( + class_decl=ClassDecl( + typename=PQName( + segments=[NameSpecifier(name="Foo")], classkey="class" + ) + ), + fields=[ + Field( + access="private", + type=Type( + typename=PQName( + segments=[NameSpecifier(name="Standard_Integer")] + ), + volatile=True, + ), + name="myRefCount_", + mutable=True, + ) + ], + ) + ] + ) + ) diff --git a/tests/test_fn.py b/tests/test_fn.py index 9b571be..c8d974a 100644 --- a/tests/test_fn.py +++ b/tests/test_fn.py @@ -821,3 +821,39 @@ def test_fn_trailing_return_std_function(): ] ) ) + + +def test_inline_volatile_fn(): + content = """ + inline int Standard_Atomic_Increment (volatile int* theValue); + """ + data = parse_string(content, cleandoc=True) + + assert data == ParsedData( + namespace=NamespaceScope( + functions=[ + Function( + return_type=Type( + typename=PQName(segments=[FundamentalSpecifier(name="int")]) + ), + name=PQName( + segments=[NameSpecifier(name="Standard_Atomic_Increment")] + ), + parameters=[ + Parameter( + type=Pointer( + ptr_to=Type( + typename=PQName( + segments=[FundamentalSpecifier(name="int")] + ), + volatile=True, + ) + ), + name="theValue", + ) + ], + inline=True, + ) + ] + ) + )