Improved handling of method template deductions

This commit is contained in:
Bartek Kryza
2023-04-18 23:56:09 +02:00
parent 6323ce8a92
commit 7f9d698afc
7 changed files with 197 additions and 21 deletions

View File

@@ -94,6 +94,35 @@ TEST_CASE("Test replace_all", "[unit-test]")
CHECK(text == orig);
}
TEST_CASE("Test extract_template_parameter_index", "[unit-test]")
{
using namespace clanguml::common;
{
const auto [depth, index, qualifier] =
extract_template_parameter_index("type-parameter-0-0");
CHECK(depth == 0);
CHECK(index == 0);
CHECK(qualifier.empty());
}
{
const auto [depth, index, qualifier] =
extract_template_parameter_index("type-parameter-0-0 &&");
CHECK(depth == 0);
CHECK(index == 0);
CHECK(qualifier == "&&");
}
{
const auto [depth, index, qualifier] =
extract_template_parameter_index("type-parameter-12-678 const&");
CHECK(depth == 12);
CHECK(index == 678);
CHECK(qualifier == "const&");
}
}
TEST_CASE("Test parse_unexposed_template_params", "[unit-test]")
{
using namespace clanguml::common;