Added generation of package diagrams from directory structure instead of namespaces
This commit is contained in:
@@ -11,7 +11,9 @@ namespace A1 {
|
||||
struct CA { };
|
||||
}
|
||||
namespace A2 {
|
||||
struct CB { };
|
||||
template <typename T> struct CB {
|
||||
T cb;
|
||||
};
|
||||
}
|
||||
namespace A3 {
|
||||
struct CC { };
|
||||
@@ -58,12 +60,15 @@ struct CP { };
|
||||
namespace A17 {
|
||||
struct CR { };
|
||||
}
|
||||
namespace A18 {
|
||||
enum class S { s1, s2, s3 };
|
||||
}
|
||||
}
|
||||
namespace B::BB::BBB {
|
||||
class CBA : public A::AA::A6::CF {
|
||||
public:
|
||||
A::AA::A1::CA *ca_;
|
||||
A::AA::A2::CB cb_;
|
||||
A::AA::A2::CB<int> cb_;
|
||||
std::shared_ptr<A::AA::A3::CC> cc_;
|
||||
std::map<std::string, std::unique_ptr<A::AA::A4::CD>> *cd_;
|
||||
std::array<A::AA::A15::CO, 5> co_;
|
||||
@@ -91,6 +96,8 @@ public:
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
A::AA::A18::S s;
|
||||
};
|
||||
|
||||
void cj(std::unique_ptr<A::AA::A10::CJ> /*cj_*/) { }
|
||||
|
||||
@@ -51,6 +51,7 @@ TEST_CASE("t30002", "[test-case][package]")
|
||||
REQUIRE_THAT(puml, IsPackage("A15"));
|
||||
REQUIRE_THAT(puml, IsPackage("A16"));
|
||||
REQUIRE_THAT(puml, IsPackage("A17"));
|
||||
REQUIRE_THAT(puml, IsPackage("A18"));
|
||||
|
||||
REQUIRE_THAT(puml, IsDependency(_A("BBB"), _A("A1")));
|
||||
REQUIRE_THAT(puml, IsDependency(_A("BBB"), _A("A2")));
|
||||
@@ -69,6 +70,7 @@ TEST_CASE("t30002", "[test-case][package]")
|
||||
REQUIRE_THAT(puml, IsDependency(_A("BBB"), _A("A15")));
|
||||
REQUIRE_THAT(puml, IsDependency(_A("BBB"), _A("A16")));
|
||||
REQUIRE_THAT(puml, IsDependency(_A("BBB"), _A("A17")));
|
||||
REQUIRE_THAT(puml, IsDependency(_A("BBB"), _A("A18")));
|
||||
|
||||
save_puml(
|
||||
config.output_directory() + "/" + diagram->name + ".puml", puml);
|
||||
|
||||
@@ -354,6 +354,7 @@ using namespace clanguml::test::matchers;
|
||||
#include "t30007/test_case.h"
|
||||
#include "t30008/test_case.h"
|
||||
#include "t30009/test_case.h"
|
||||
#include "t30010/test_case.h"
|
||||
|
||||
///
|
||||
/// Include diagram tests
|
||||
|
||||
@@ -308,6 +308,9 @@ test_cases:
|
||||
- name: t30009
|
||||
title: Together layout hint test
|
||||
description:
|
||||
- name: t30010
|
||||
title: Package diagram with packages from directory structure
|
||||
description:
|
||||
Include diagrams:
|
||||
- name: t40001
|
||||
title: Basic include graph diagram test case
|
||||
|
||||
Reference in New Issue
Block a user