Skip to content

Commit

Permalink
Ignore friend classes in doc/sip coverage test
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Nov 10, 2015
1 parent da627e9 commit 1b28984
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/src/python/utilities.py
Expand Up @@ -551,6 +551,10 @@ def elemIsBindableMember(self, elem):
if self.isProperty(elem):
return False

# ignore friend classes
if self.isFriendClass(elem):
return False

if self.isVariable(elem) and self.visibility(elem) == 'protected':
#protected variables can't be bound in SIP
return False
Expand Down Expand Up @@ -594,6 +598,10 @@ def elemIsDocumentableMember(self, elem):
if self.isReimplementation(elem):
return False

# ignore friend classes
if self.isFriendClass(elem):
return False

# ignore destructor
if self.isDestructor(elem):
return False
Expand Down Expand Up @@ -705,6 +713,18 @@ def isOperator(self, member_elem):

return False

def isFriendClass(self, member_elem):
""" Tests whether an member is a friend class
:param member_elem: XML element for a class member
"""
try:
definition = member_elem.find('definition').text
if definition.startswith('friend class'):
return True
except:
pass
return False

def isReimplementation(self, member_elem):
""" Tests whether an member is a reimplementation
:param member_elem: XML element for a class member
Expand Down

0 comments on commit 1b28984

Please sign in to comment.