Skip to content

Commit 2dc5df5

Browse files
committed
add test for access property on 'using'
1 parent da346a5 commit 2dc5df5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/test_CppHeaderParser.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4015,6 +4015,7 @@ def setUp(self):
40154015
self.cppHeader = CppHeaderParser.CppHeader(
40164016
"""
40174017
template <class D> class P {
4018+
using A = typename f::TP<D>::A;
40184019
public:
40194020
using State = typename f::TP<D>::S;
40204021
P(State st);
@@ -4026,9 +4027,15 @@ def setUp(self):
40264027
def test_fn(self):
40274028
c = self.cppHeader.classes["P"]
40284029
self.assertEqual("P", c["name"])
4030+
self.assertEqual(len(c["using"]), 2)
40294031
state = c["using"]["State"]
40304032
self.assertEqual(state["raw_type"], "typename f::TP<D >::S")
40314033
self.assertEqual(state["type"], "typename TP<D >::S")
4034+
self.assertEqual(state["access"], "public")
4035+
private = c["using"]["A"]
4036+
self.assertEqual(private["raw_type"], "typename f::TP<D >::A")
4037+
self.assertEqual(private["type"], "typename TP<D >::A")
4038+
self.assertEqual(private["access"], "private")
40324039

40334040
m = c["methods"]["public"][0]
40344041
self.assertEqual(m["name"], "P")

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy