Added note decorator test case

This commit is contained in:
Bartek Kryza
2021-07-29 19:19:24 +02:00
parent 75cb5765f8
commit 4ee1aee0e7
11 changed files with 189 additions and 7 deletions

View File

@@ -289,8 +289,9 @@ public:
for (auto decorator : c.decorators) {
auto note = std::dynamic_pointer_cast<decorators::note>(decorator);
if (note) {
ostr << "note " << note->position << " of " << c.alias()
<< " : " << note->text << '\n';
ostr << "note " << note->position << " of " << c.alias() << '\n'
<< note->text << '\n'
<< "end note\n";
}
}
@@ -339,6 +340,7 @@ public:
relstr << " : " << r.label;
relstr << '\n';
ostr << relstr.str();
}
catch (error::uml_alias_missing &ex) {
@@ -347,6 +349,18 @@ public:
to_string(r.type), e.name, destination, ex.what());
}
}
//
// Process notes
//
for (auto decorator : e.decorators) {
auto note = std::dynamic_pointer_cast<decorators::note>(decorator);
if (note) {
ostr << "note " << note->position << " of " << e.alias() << '\n'
<< note->text << '\n'
<< "end note\n";
}
}
}
void generate(std::ostream &ostr) const