Fixed formatting
This commit is contained in:
@@ -486,7 +486,7 @@ bool is_identifier(const std::string &t)
|
|||||||
|
|
||||||
bool is_keyword(const std::string &t)
|
bool is_keyword(const std::string &t)
|
||||||
{
|
{
|
||||||
static std::vector<std::string> keywords {"alignas", "alignof", "asm",
|
static std::vector<std::string> keywords{"alignas", "alignof", "asm",
|
||||||
"auto", "bool", "break", "case", "catch", "char", "char16_t",
|
"auto", "bool", "break", "case", "catch", "char", "char16_t",
|
||||||
"char32_t", "class", "concept", "const", "constexpr", "const_cast",
|
"char32_t", "class", "concept", "const", "constexpr", "const_cast",
|
||||||
"continue", "decltype", "default", "delete", "do", "double",
|
"continue", "decltype", "default", "delete", "do", "double",
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ template <typename M, typename C> struct A<M C::*> {
|
|||||||
M C::*m;
|
M C::*m;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename M, typename C> struct A<M C::* &&> {
|
template <typename M, typename C> struct A<M C::*&&> {
|
||||||
C &&c;
|
C &&c;
|
||||||
M C::*m;
|
M C::*m;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -35,41 +35,39 @@ TEST_CASE("t00062", "[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, IsClass(_A("AAA")));
|
REQUIRE_THAT(puml, IsClass(_A("AAA")));
|
||||||
|
|
||||||
// Check if class templates exist
|
// Check if class templates exist
|
||||||
//REQUIRE_THAT(puml, IsClassTemplate("A", "T,P,CMP,int N"));
|
// REQUIRE_THAT(puml, IsClassTemplate("A", "T,P,CMP,int N"));
|
||||||
|
|
||||||
// Check concepts
|
// Check concepts
|
||||||
//REQUIRE_THAT(puml, IsConcept(_A("AConcept<T>")));
|
// REQUIRE_THAT(puml, IsConcept(_A("AConcept<T>")));
|
||||||
//REQUIRE_THAT(puml,
|
// REQUIRE_THAT(puml,
|
||||||
// IsConceptRequirement(
|
// IsConceptRequirement(
|
||||||
// _A("AConcept<T,P>"), "sizeof (T) > sizeof (P)"));
|
// _A("AConcept<T,P>"), "sizeof (T) > sizeof (P)"));
|
||||||
|
|
||||||
// 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("Child")));
|
// REQUIRE_THAT(puml, IsBaseClass(_A("Base"), _A("Child")));
|
||||||
|
|
||||||
// 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
|
// Check if all fields exist
|
||||||
//REQUIRE_THAT(puml, (IsField<Private>("private_member", "int")));
|
// REQUIRE_THAT(puml, (IsField<Private>("private_member", "int")));
|
||||||
|
|
||||||
// Check if all relationships exist
|
// Check if all relationships exist
|
||||||
//REQUIRE_THAT(puml, IsAssociation(_A("D"), _A("A"), "-as"));
|
// REQUIRE_THAT(puml, IsAssociation(_A("D"), _A("A"), "-as"));
|
||||||
//REQUIRE_THAT(puml, IsDependency(_A("R"), _A("B")));
|
// REQUIRE_THAT(puml, IsDependency(_A("R"), _A("B")));
|
||||||
//REQUIRE_THAT(puml, IsAggregation(_A("R"), _A("D"), "-ag"));
|
// REQUIRE_THAT(puml, IsAggregation(_A("R"), _A("D"), "-ag"));
|
||||||
//REQUIRE_THAT(puml, IsComposition(_A("R"), _A("D"), "-ac"));
|
// REQUIRE_THAT(puml, IsComposition(_A("R"), _A("D"), "-ac"));
|
||||||
//REQUIRE_THAT(puml, IsInstantiation(_A("ABCD::F<T>"), _A("F<int>")));
|
// 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);
|
||||||
@@ -82,5 +80,4 @@ TEST_CASE("t00062", "[test-case][class]")
|
|||||||
|
|
||||||
save_json(config.output_directory() + "/" + diagram->name + ".json", j);
|
save_json(config.output_directory() + "/" + diagram->name + ".json", j);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -292,8 +292,7 @@ TEST_CASE(
|
|||||||
tp1.set_method_template(true);
|
tp1.set_method_template(true);
|
||||||
tp1.add_template_param(template_parameter::make_template_type("Ret"));
|
tp1.add_template_param(template_parameter::make_template_type("Ret"));
|
||||||
tp1.add_template_param(template_parameter::make_template_type("C"));
|
tp1.add_template_param(template_parameter::make_template_type("C"));
|
||||||
tp1.add_template_param(
|
tp1.add_template_param(template_parameter::make_template_type("Arg0"));
|
||||||
template_parameter::make_template_type("Arg0"));
|
|
||||||
|
|
||||||
auto tp2 = template_parameter::make_template_type({});
|
auto tp2 = template_parameter::make_template_type({});
|
||||||
tp2.set_method_template(true);
|
tp2.set_method_template(true);
|
||||||
@@ -309,8 +308,7 @@ TEST_CASE(
|
|||||||
tp1.set_method_template(true);
|
tp1.set_method_template(true);
|
||||||
tp1.add_template_param(template_parameter::make_template_type("Ret"));
|
tp1.add_template_param(template_parameter::make_template_type("Ret"));
|
||||||
tp1.add_template_param(template_parameter::make_template_type("C"));
|
tp1.add_template_param(template_parameter::make_template_type("C"));
|
||||||
tp1.add_template_param(
|
tp1.add_template_param(template_parameter::make_template_type("Arg0"));
|
||||||
template_parameter::make_template_type("Arg0"));
|
|
||||||
|
|
||||||
auto tp2 = template_parameter::make_template_type({});
|
auto tp2 = template_parameter::make_template_type({});
|
||||||
tp2.set_method_template(true);
|
tp2.set_method_template(true);
|
||||||
|
|||||||
@@ -352,8 +352,7 @@ TEST_CASE("Test tokenize_unexposed_template_parameter", "[unit-test]")
|
|||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
auto r = tokenize_unexposed_template_parameter(
|
auto r = tokenize_unexposed_template_parameter("const ns1::ns2::A &");
|
||||||
"const ns1::ns2::A &");
|
|
||||||
CHECK(r[i++] == "const");
|
CHECK(r[i++] == "const");
|
||||||
CHECK(r[i++] == "ns1::ns2::A");
|
CHECK(r[i++] == "ns1::ns2::A");
|
||||||
CHECK(r[i++] == "&");
|
CHECK(r[i++] == "&");
|
||||||
@@ -362,8 +361,7 @@ TEST_CASE("Test tokenize_unexposed_template_parameter", "[unit-test]")
|
|||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
auto r = tokenize_unexposed_template_parameter(
|
auto r = tokenize_unexposed_template_parameter("class ns1::ns2::A &");
|
||||||
"class ns1::ns2::A &");
|
|
||||||
CHECK(r[i++] == "ns1::ns2::A");
|
CHECK(r[i++] == "ns1::ns2::A");
|
||||||
CHECK(r[i++] == "&");
|
CHECK(r[i++] == "&");
|
||||||
}
|
}
|
||||||
@@ -371,8 +369,7 @@ TEST_CASE("Test tokenize_unexposed_template_parameter", "[unit-test]")
|
|||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
auto r = tokenize_unexposed_template_parameter(
|
auto r = tokenize_unexposed_template_parameter("ns1::ns2::A C::* &&");
|
||||||
"ns1::ns2::A C::* &&");
|
|
||||||
CHECK(r[i++] == "ns1::ns2::A");
|
CHECK(r[i++] == "ns1::ns2::A");
|
||||||
CHECK(r[i++] == "C");
|
CHECK(r[i++] == "C");
|
||||||
CHECK(r[i++] == "::");
|
CHECK(r[i++] == "::");
|
||||||
@@ -383,8 +380,7 @@ TEST_CASE("Test tokenize_unexposed_template_parameter", "[unit-test]")
|
|||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
auto r = tokenize_unexposed_template_parameter(
|
auto r = tokenize_unexposed_template_parameter("unsigned int");
|
||||||
"unsigned int");
|
|
||||||
CHECK(r[i++] == "unsigned");
|
CHECK(r[i++] == "unsigned");
|
||||||
CHECK(r[i++] == "int");
|
CHECK(r[i++] == "int");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user