Added handling of static class fields
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
#include <functional>
|
||||
|
||||
namespace clanguml {
|
||||
namespace t00003 {
|
||||
|
||||
@@ -11,20 +13,28 @@ public:
|
||||
void basic_method() {}
|
||||
static int static_method() { return 0; }
|
||||
void const_method() const {}
|
||||
auto auto_method() { return 1; }
|
||||
|
||||
int public_member;
|
||||
static int static_int;
|
||||
static const int static_const_int = 1;
|
||||
|
||||
protected:
|
||||
void protected_method() {}
|
||||
|
||||
int protected_member;
|
||||
|
||||
std::function<bool(const int)> compare = [this](const int v) {
|
||||
return private_member > v;
|
||||
};
|
||||
|
||||
private:
|
||||
void private_method() {}
|
||||
|
||||
int private_member;
|
||||
|
||||
int a, b, c;
|
||||
};
|
||||
|
||||
int A::static_int = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -204,6 +204,7 @@ TEST_CASE("Test t00003", "[unit-test]")
|
||||
REQUIRE_THAT(puml, Contains("-int a"));
|
||||
REQUIRE_THAT(puml, Contains("-int b"));
|
||||
REQUIRE_THAT(puml, Contains("-int c"));
|
||||
REQUIRE_THAT(puml, Contains("{static} +int static_int"));
|
||||
|
||||
save_puml(
|
||||
"./" + config.output_directory + "/" + diagram->name + ".puml", puml);
|
||||
|
||||
Reference in New Issue
Block a user