def test_argument_list(empty_generating_api): type1 = TypeRef("lang") type1.prefix = "const " type1.name = "Type1" type2 = TypeRef("lang") type2.name = "Type2" type2.suffix = " &" type2.id = "lang-type2" type3 = TypeRef("lang") type3.name = "Type3" type3.nested = [type1, type2] param1 = Parameter() param1.type = type1 param2 = Parameter() param2.type = type2 param2.name = "arg2" param3 = Parameter() param3.type = type3 param3.name = "arg3" helper = TemplateHelper(empty_generating_api) assert (helper.argument_list( [param1, param2, param3]) == "(const Type1, xref:lang-type2[++Type2++] & arg2, " "Type3<const Type1, xref:lang-type2[++Type2++] &> arg3)")
def test_argument_list__empty(empty_generating_api): helper = TemplateHelper(empty_generating_api) assert helper.argument_list([]) == "()"