Added detection of dependency relationships from unexposed template params
This commit is contained in:
@@ -22,12 +22,13 @@ struct key_t {
|
||||
template <typename T> struct map;
|
||||
|
||||
template <>
|
||||
struct map<std::integral_constant<property_t, property_t::property_a>> : A {
|
||||
struct map<std::integral_constant<clanguml::t00038::property_t,
|
||||
clanguml::t00038::property_t::property_a>> : A {
|
||||
};
|
||||
|
||||
template <>
|
||||
struct map<
|
||||
std::vector<std::integral_constant<property_t, property_t::property_b>>>
|
||||
struct map<std::vector<
|
||||
std::integral_constant<t00038::property_t, t00038::property_t::property_b>>>
|
||||
: B {
|
||||
};
|
||||
|
||||
|
||||
@@ -45,7 +45,8 @@ TEST_CASE("t00038", "[test-case][class]")
|
||||
"std::integral_constant<property_t,property_t::property_a>"));
|
||||
REQUIRE_THAT(puml,
|
||||
IsClassTemplate("map",
|
||||
"std::vector<std::integral_constant<property_t,property_t::"
|
||||
"std::vector<std::integral_constant<t00038::property_t,t00038::"
|
||||
"property_t::"
|
||||
"property_b>>"));
|
||||
REQUIRE_THAT(puml,
|
||||
IsClassTemplate("map",
|
||||
@@ -61,17 +62,28 @@ TEST_CASE("t00038", "[test-case][class]")
|
||||
|
||||
// TODO: Add parsing of unexposed template arguments to infer
|
||||
// additional relationships
|
||||
/*
|
||||
|
||||
REQUIRE_THAT(puml,
|
||||
IsDependency(_A("map<std::integral_constant<property_t,property_t::"
|
||||
"property_a>>"),
|
||||
_A("property_t")));
|
||||
|
||||
REQUIRE_THAT(puml,
|
||||
IsDependency(_A("map<"
|
||||
"std::vector<std::integral_constant<t00038::property_t,"
|
||||
"t00038::property_t::"
|
||||
"property_b>>>"),
|
||||
_A("property_t")));
|
||||
|
||||
REQUIRE_THAT(puml,
|
||||
IsDependency(_A("map<std::map<key_t,std::vector<std::integral_constant<"
|
||||
"property_t,property_t::property_c>>>>"),
|
||||
_A("property_t")));
|
||||
|
||||
REQUIRE_THAT(puml,
|
||||
IsDependency(_A("map<std::map<key_t,std::vector<std::integral_constant<"
|
||||
"property_t,property_t::property_c>>>>"),
|
||||
_A("key_t")));
|
||||
*/
|
||||
|
||||
save_puml(
|
||||
"./" + config.output_directory() + "/" + diagram->name + ".puml", puml);
|
||||
|
||||
Reference in New Issue
Block a user