Fixed formatting
This commit is contained in:
@@ -263,8 +263,8 @@ public:
|
|||||||
visitor_.TraverseDecl(ast_context.getTranslationUnitDecl());
|
visitor_.TraverseDecl(ast_context.getTranslationUnitDecl());
|
||||||
visitor_.finalize();
|
visitor_.finalize();
|
||||||
|
|
||||||
// LOG_DBG("= Finalized translation unit: {}",
|
// LOG_DBG("= Finalized translation unit: {}",
|
||||||
// ast_context.getTranslationUnitDecl());
|
// ast_context.getTranslationUnitDecl());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ TEST_CASE("t00014", "[test-case][class]")
|
|||||||
REQUIRE_THAT(puml, IsClassTemplate("A", "double,T"));
|
REQUIRE_THAT(puml, IsClassTemplate("A", "double,T"));
|
||||||
// TODO: Figure out how to handle the same templates with different template
|
// TODO: Figure out how to handle the same templates with different template
|
||||||
// parameter names
|
// parameter names
|
||||||
// REQUIRE_THAT(puml, !IsClassTemplate("A", "long,U"));
|
// REQUIRE_THAT(puml, !IsClassTemplate("A", "long,U"));
|
||||||
REQUIRE_THAT(puml, IsClassTemplate("A", "long,T"));
|
REQUIRE_THAT(puml, IsClassTemplate("A", "long,T"));
|
||||||
REQUIRE_THAT(puml, IsClassTemplate("A", "long,bool"));
|
REQUIRE_THAT(puml, IsClassTemplate("A", "long,bool"));
|
||||||
REQUIRE_THAT(puml, IsClassTemplate("A", "double,bool"));
|
REQUIRE_THAT(puml, IsClassTemplate("A", "double,bool"));
|
||||||
@@ -48,7 +48,7 @@ TEST_CASE("t00014", "[test-case][class]")
|
|||||||
REQUIRE_THAT(puml, IsClassTemplate("A", "double,float"));
|
REQUIRE_THAT(puml, IsClassTemplate("A", "double,float"));
|
||||||
REQUIRE_THAT(puml, IsClassTemplate("A", "bool,std::string"));
|
REQUIRE_THAT(puml, IsClassTemplate("A", "bool,std::string"));
|
||||||
REQUIRE_THAT(puml, IsClassTemplate("A", "std::string,std::string"));
|
REQUIRE_THAT(puml, IsClassTemplate("A", "std::string,std::string"));
|
||||||
REQUIRE_THAT(puml, IsClassTemplate("A", "char,std::string"));
|
REQUIRE_THAT(puml, IsClassTemplate("A", "char,std::string"));
|
||||||
REQUIRE_THAT(puml, IsClass(_A("B")));
|
REQUIRE_THAT(puml, IsClass(_A("B")));
|
||||||
|
|
||||||
REQUIRE_THAT(puml, IsField<Private>("bapair", "PairPairBA<bool>"));
|
REQUIRE_THAT(puml, IsField<Private>("bapair", "PairPairBA<bool>"));
|
||||||
@@ -76,7 +76,8 @@ TEST_CASE("t00014", "[test-case][class]")
|
|||||||
REQUIRE_THAT(puml, IsInstantiation(_A("A<long,T>"), _A("A<long,bool>")));
|
REQUIRE_THAT(puml, IsInstantiation(_A("A<long,T>"), _A("A<long,bool>")));
|
||||||
|
|
||||||
REQUIRE_THAT(puml, IsInstantiation(_A("A<T,P>"), _A("A<long,T>")));
|
REQUIRE_THAT(puml, IsInstantiation(_A("A<T,P>"), _A("A<long,T>")));
|
||||||
// REQUIRE_THAT(puml, !IsInstantiation(_A("A<long,T>"), _A("A<long,U>")));
|
// REQUIRE_THAT(puml, !IsInstantiation(_A("A<long,T>"),
|
||||||
|
// _A("A<long,U>")));
|
||||||
REQUIRE_THAT(
|
REQUIRE_THAT(
|
||||||
puml, IsInstantiation(_A("A<double,T>"), _A("A<double,float>")));
|
puml, IsInstantiation(_A("A<double,T>"), _A("A<double,float>")));
|
||||||
REQUIRE_THAT(
|
REQUIRE_THAT(
|
||||||
@@ -87,9 +88,8 @@ TEST_CASE("t00014", "[test-case][class]")
|
|||||||
IsInstantiation(_A("A<T,std::string>"), _A("A<bool,std::string>")));
|
IsInstantiation(_A("A<T,std::string>"), _A("A<bool,std::string>")));
|
||||||
REQUIRE_THAT(puml,
|
REQUIRE_THAT(puml,
|
||||||
IsInstantiation(_A("A<T,std::string>"), _A("A<char,std::string>")));
|
IsInstantiation(_A("A<T,std::string>"), _A("A<char,std::string>")));
|
||||||
REQUIRE_THAT(puml,
|
REQUIRE_THAT(puml,
|
||||||
IsInstantiation(_A("A<T,std::string>"),
|
IsInstantiation(_A("A<T,std::string>"), _A("A<wchar_t,std::string>")));
|
||||||
_A("A<wchar_t,std::string>")));
|
|
||||||
|
|
||||||
REQUIRE_THAT(puml,
|
REQUIRE_THAT(puml,
|
||||||
IsInstantiation(_A("A<T,std::unique_ptr<std::string>>"),
|
IsInstantiation(_A("A<T,std::unique_ptr<std::string>>"),
|
||||||
@@ -111,7 +111,7 @@ TEST_CASE("t00014", "[test-case][class]")
|
|||||||
REQUIRE_THAT(puml,
|
REQUIRE_THAT(puml,
|
||||||
IsAggregation(_A("R"), _A("A<float,std::unique_ptr<std::string>>"),
|
IsAggregation(_A("R"), _A("A<float,std::unique_ptr<std::string>>"),
|
||||||
"-floatstring"));
|
"-floatstring"));
|
||||||
REQUIRE_THAT(puml, IsDependency(_A("R"), _A("A<char,std::string>")));
|
REQUIRE_THAT(puml, IsDependency(_A("R"), _A("A<char,std::string>")));
|
||||||
REQUIRE_THAT(puml, IsDependency(_A("R"), _A("A<wchar_t,std::string>")));
|
REQUIRE_THAT(puml, IsDependency(_A("R"), _A("A<wchar_t,std::string>")));
|
||||||
|
|
||||||
save_puml(
|
save_puml(
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
namespace clanguml {
|
namespace clanguml {
|
||||||
namespace t00048 {
|
namespace t00048 {
|
||||||
|
|
||||||
void A::foo() {}
|
void A::foo() { }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -14,7 +14,7 @@ struct A : public Base {
|
|||||||
template <typename T> struct ATemplate : public BaseTemplate<T> {
|
template <typename T> struct ATemplate : public BaseTemplate<T> {
|
||||||
T a;
|
T a;
|
||||||
|
|
||||||
void foo() override {}
|
void foo() override { }
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
namespace clanguml {
|
namespace clanguml {
|
||||||
namespace t00048 {
|
namespace t00048 {
|
||||||
|
|
||||||
void B::foo() {}
|
void B::foo() { }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -14,7 +14,7 @@ struct B : public Base {
|
|||||||
template <typename T> struct BTemplate : public BaseTemplate<T> {
|
template <typename T> struct BTemplate : public BaseTemplate<T> {
|
||||||
T b;
|
T b;
|
||||||
|
|
||||||
void foo() override {}
|
void foo() override { }
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
#include "t00048.h"
|
#include "t00048.h"
|
||||||
|
|
||||||
namespace clanguml {
|
namespace clanguml {
|
||||||
namespace t00048
|
namespace t00048 {
|
||||||
{
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -34,41 +34,38 @@ TEST_CASE("t00048", "[test-case][class]")
|
|||||||
REQUIRE_THAT(puml, StartsWith("@startuml"));
|
REQUIRE_THAT(puml, StartsWith("@startuml"));
|
||||||
REQUIRE_THAT(puml, EndsWith("@enduml\n"));
|
REQUIRE_THAT(puml, EndsWith("@enduml\n"));
|
||||||
|
|
||||||
|
|
||||||
// Check if all classes exist
|
// Check if all classes exist
|
||||||
REQUIRE_THAT(puml, IsAbstractClass(_A("Base")));
|
REQUIRE_THAT(puml, IsAbstractClass(_A("Base")));
|
||||||
REQUIRE_THAT(puml, IsClass(_A("A")));
|
REQUIRE_THAT(puml, IsClass(_A("A")));
|
||||||
REQUIRE_THAT(puml, IsClass(_A("B")));
|
REQUIRE_THAT(puml, IsClass(_A("B")));
|
||||||
|
|
||||||
|
|
||||||
// Check if class templates exist
|
// Check if class templates exist
|
||||||
REQUIRE_THAT(puml, IsAbstractClassTemplate("BaseTemplate", "T"));
|
REQUIRE_THAT(puml, IsAbstractClassTemplate("BaseTemplate", "T"));
|
||||||
REQUIRE_THAT(puml, IsClassTemplate("ATemplate", "T"));
|
REQUIRE_THAT(puml, IsClassTemplate("ATemplate", "T"));
|
||||||
REQUIRE_THAT(puml, IsClassTemplate("BTemplate", "T"));
|
REQUIRE_THAT(puml, IsClassTemplate("BTemplate", "T"));
|
||||||
|
|
||||||
// Check if all enums exist
|
// Check if all enums exist
|
||||||
//REQUIRE_THAT(puml, IsEnum(_A("Lights")));
|
// REQUIRE_THAT(puml, IsEnum(_A("Lights")));
|
||||||
|
|
||||||
// Check if all inner classes exist
|
// Check if all inner classes exist
|
||||||
//REQUIRE_THAT(puml, IsInnerClass(_A("A"), _A("AA")));
|
// REQUIRE_THAT(puml, IsInnerClass(_A("A"), _A("AA")));
|
||||||
|
|
||||||
// Check if all inheritance relationships exist
|
// Check if all inheritance relationships exist
|
||||||
REQUIRE_THAT(puml, IsBaseClass(_A("Base"), _A("A")));
|
REQUIRE_THAT(puml, IsBaseClass(_A("Base"), _A("A")));
|
||||||
REQUIRE_THAT(puml, IsBaseClass(_A("Base"), _A("B")));
|
REQUIRE_THAT(puml, IsBaseClass(_A("Base"), _A("B")));
|
||||||
|
|
||||||
// Check if all methods exist
|
// Check if all methods exist
|
||||||
//REQUIRE_THAT(puml, (IsMethod<Public, Const>("foo")));
|
// REQUIRE_THAT(puml, (IsMethod<Public, Const>("foo")));
|
||||||
|
|
||||||
// Check if all fields exist
|
|
||||||
//REQUIRE_THAT(puml, (IsField<Private>("private_member", "int")));
|
|
||||||
|
|
||||||
// Check if all relationships exist
|
|
||||||
//REQUIRE_THAT(puml, IsAssociation(_A("D"), _A("A"), "-as"));
|
|
||||||
//REQUIRE_THAT(puml, IsDependency(_A("R"), _A("B")));
|
|
||||||
//REQUIRE_THAT(puml, IsAggregation(_A("R"), _A("D")));
|
|
||||||
//REQUIRE_THAT(puml, IsComposition(_A("R"), _A("D")));
|
|
||||||
//REQUIRE_THAT(puml, IsInstantiation(_A("ABCD::F<T>"), _A("F<int>")));
|
|
||||||
|
|
||||||
|
// Check if all fields exist
|
||||||
|
// REQUIRE_THAT(puml, (IsField<Private>("private_member", "int")));
|
||||||
|
|
||||||
|
// Check if all relationships exist
|
||||||
|
// REQUIRE_THAT(puml, IsAssociation(_A("D"), _A("A"), "-as"));
|
||||||
|
// REQUIRE_THAT(puml, IsDependency(_A("R"), _A("B")));
|
||||||
|
// REQUIRE_THAT(puml, IsAggregation(_A("R"), _A("D")));
|
||||||
|
// REQUIRE_THAT(puml, IsComposition(_A("R"), _A("D")));
|
||||||
|
// REQUIRE_THAT(puml, IsInstantiation(_A("ABCD::F<T>"), _A("F<int>")));
|
||||||
|
|
||||||
save_puml(
|
save_puml(
|
||||||
"./" + config.output_directory() + "/" + diagram->name + ".puml", puml);
|
"./" + config.output_directory() + "/" + diagram->name + ".puml", puml);
|
||||||
|
|||||||
Reference in New Issue
Block a user