mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-10-13 17:02:12 -05:00
C++, update id generation to use name mangling
This commit is contained in:
1 parent
c19a15ea0d
commit
14e6affa7d
2 files changed
+231
-120
No files matched your search
@@ -31,11 +31,13 @@ def check(name, input, output=None):
|
||||
ast = parse(name, input)
|
||||
res = text_type(ast)
|
||||
if res != output:
|
||||
print("Input: ", text_type(input))
|
||||
print("Result:", res)
|
||||
print "Input: ", text_type(input)
|
||||
print "Result: ", res
|
||||
print "Expected: ", output
|
||||
raise DefinitionError("")
|
||||
# now check describe_signature
|
||||
ast.describe_signature([], 'lastIsName', None)
|
||||
ast.prefixedName = ast.name # otherwise the get_id fails, it would be set in handle_signarue
|
||||
ast.get_id()
|
||||
#print ".. %s:: %s" % (name, input)
|
||||
|
||||
def test_type_definitions():
|
||||
@@ -92,7 +94,7 @@ def test_type_definitions():
|
||||
check('function', 'MyClass::a_member_function() &&')
|
||||
check('function', 'MyClass::a_member_function() &')
|
||||
check('function', 'MyClass::a_member_function() const &')
|
||||
check('function', 'int main(int argc, char *argv[][])')
|
||||
check('function', 'int main(int argc, char *argv[])')
|
||||
check('function', 'MyClass &MyClass::operator++()')
|
||||
check('function', 'MyClass::pointer MyClass::operator->()')
|
||||
|
||||
|
||||
Reference in new issue
Block a user