Skip to content
Permalink
Browse files

Ignore friend classes in doc/sip coverage test

  • Loading branch information
nyalldawson committed Nov 10, 2015
1 parent da627e9 commit 1b28984eccffb9c0b2f0f517b344702e40d7baf3
Showing with 20 additions and 0 deletions.
  1. +20 −0 tests/src/python/utilities.py
@@ -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
@@ -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
@@ -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

0 comments on commit 1b28984

Please sign in to comment.
You can’t perform that action at this time.