Skip to content

Commit

Permalink
Add double friend test
Browse files Browse the repository at this point in the history
  • Loading branch information
emilydolson authored and cjdb committed Jun 20, 2023
1 parent 5c810c7 commit 6301918
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/test_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,3 +592,18 @@ def test_ellipsis(app):
# Verify that parsing an ellipsis works
ast_param = cls._parse_args(argsstrings[0])
ret = cls._resolve_function(matches, ast_param, None)


def test_render_constexpr_friend_func(app):
member_def = WrappedMemberDef(
kind="function",
definition="constexpr friend bool operator==",
type_="constexpr friend bool",
name="operator==",
argsstring="(cat const x, int const y)",
virt="non-virtual",
const="no",
)
rendered = render(app, member_def)
signature = find_node(rendered, "desc_signature")
assert signature.astext().startswith("friend constexpr bool")

0 comments on commit 6301918

Please sign in to comment.