Added test for skip and skiprelationship decorators

This commit is contained in:
Bartek Kryza
2021-07-31 16:16:25 +02:00
parent 747ab731bb
commit 3f8100a050
3 changed files with 14 additions and 2 deletions

View File

@@ -193,6 +193,12 @@ void tu_visitor::process_enum_declaration(const cppast::cpp_enum &enm)
enum_ e;
e.name = cx::util::full_name(ctx.namespace_, enm);
if (enm.comment().has_value())
e.decorators = decorators::parse(enm.comment().value());
if (e.skip())
return;
// Process enum documentation comment
if (enm.comment().has_value())
e.decorators = decorators::parse(enm.comment().value());
@@ -230,6 +236,12 @@ void tu_visitor::process_class_declaration(const cppast::cpp_class &cls,
c.is_struct = cls.class_kind() == cppast::cpp_class_kind::struct_t;
c.name = cx::util::full_name(ctx.namespace_, cls);
if (cls.comment().has_value())
c.decorators = decorators::parse(cls.comment().value());
if (c.skip())
return;
cppast::cpp_access_specifier_kind last_access_specifier =
cppast::cpp_access_specifier_kind::cpp_private;

View File

@@ -132,6 +132,7 @@ using namespace clanguml::test::matchers;
#include "t00026/test_case.h"
#include "t00027/test_case.h"
#include "t00028/test_case.h"
#include "t00029/test_case.h"
//
// Sequence diagram tests

View File

@@ -170,8 +170,7 @@ struct AliasMatcher {
}
}
throw std::runtime_error(fmt::format(
"Cannot find alias {} in {}", name, fmt::join(puml, "\n")));
return "__INVALID__ALIAS__";
}
const std::vector<std::string> puml;