Added test case for accessing comments from inja templates

This commit is contained in:
Bartek Kryza
2022-09-15 23:35:38 +02:00
parent 371ad836eb
commit 693a09e20d
3 changed files with 157 additions and 0 deletions

38
tests/t00050/.clang-uml Normal file
View File

@@ -0,0 +1,38 @@
compilation_database_dir: ..
output_directory: puml
diagrams:
t00050_class:
type: class
glob:
- ../../tests/t00050/t00050.cc
include:
namespaces:
- clanguml::t00050
using_namespace: clanguml::t00050
plantuml:
after:
- >
note left of {{ alias("A") }}
{{ comment("A") }}
end note
- >
{% for element in diagram.elements %}
{% if element.type == "class" and existsIn(element, "comment") %}
note top of {{ element.alias }}
{{ element.comment }}
end note
{% endif %}
{% endfor %}
- >
{% for element in diagram.elements %}
{% if element.type == "enum" and existsIn(element, "comment") %}
note bottom of {{ element.alias }}
{{ element.comment }}
end note
{% endif %}
{% endfor %}