From 084bb20ef7c105145e31be5ee8ae8a8a709a6fcb Mon Sep 17 00:00:00 2001 From: Bartek Kryza Date: Wed, 6 Sep 2023 21:20:57 +0200 Subject: [PATCH] First working version of Mermaid class diagram generator --- Makefile | 8 +- README.md | 2 +- docs/class_diagrams.md | 2 +- docs/include_diagrams.md | 2 +- docs/package_diagrams.md | 2 +- docs/quick_start.md | 2 +- docs/sequence_diagrams.md | 4 +- docs/test_cases/t00002.md | 2 +- docs/test_cases/t00003.md | 2 +- docs/test_cases/t00004.md | 2 +- docs/test_cases/t00005.md | 2 +- docs/test_cases/t00006.md | 2 +- docs/test_cases/t00007.md | 2 +- docs/test_cases/t00008.md | 2 +- docs/test_cases/t00009.md | 2 +- docs/test_cases/t00010.md | 2 +- docs/test_cases/t00011.md | 2 +- docs/test_cases/t00012.md | 2 +- docs/test_cases/t00013.md | 2 +- docs/test_cases/t00014.md | 2 +- docs/test_cases/t00015.md | 2 +- docs/test_cases/t00016.md | 2 +- docs/test_cases/t00017.md | 2 +- docs/test_cases/t00018.md | 2 +- docs/test_cases/t00019.md | 2 +- docs/test_cases/t00020.md | 2 +- docs/test_cases/t00021.md | 2 +- docs/test_cases/t00022.md | 2 +- docs/test_cases/t00023.md | 2 +- docs/test_cases/t00024.md | 2 +- docs/test_cases/t00025.md | 2 +- docs/test_cases/t00026.md | 2 +- docs/test_cases/t00027.md | 2 +- docs/test_cases/t00028.md | 2 +- docs/test_cases/t00029.md | 2 +- docs/test_cases/t00030.md | 2 +- docs/test_cases/t00031.md | 2 +- docs/test_cases/t00032.md | 2 +- docs/test_cases/t00033.md | 2 +- docs/test_cases/t00034.md | 2 +- docs/test_cases/t00035.md | 2 +- docs/test_cases/t00036.md | 2 +- docs/test_cases/t00037.md | 2 +- docs/test_cases/t00038.md | 2 +- docs/test_cases/t00039.md | 2 +- docs/test_cases/t00040.md | 2 +- docs/test_cases/t00041.md | 2 +- docs/test_cases/t00042.md | 2 +- docs/test_cases/t00043.md | 2 +- docs/test_cases/t00044.md | 2 +- docs/test_cases/t00045.md | 2 +- docs/test_cases/t00046.md | 2 +- docs/test_cases/t00047.md | 2 +- docs/test_cases/t00048.md | 2 +- docs/test_cases/t00049.md | 2 +- docs/test_cases/t00050.md | 2 +- docs/test_cases/t00051.md | 2 +- docs/test_cases/t00052.md | 2 +- docs/test_cases/t00053.md | 2 +- docs/test_cases/t00054.md | 2 +- docs/test_cases/t00055.md | 2 +- docs/test_cases/t00056.md | 2 +- docs/test_cases/t00057.md | 2 +- docs/test_cases/t00058.md | 2 +- docs/test_cases/t00059.md | 2 +- docs/test_cases/t00060.md | 2 +- docs/test_cases/t00061.md | 2 +- docs/test_cases/t00062.md | 2 +- docs/test_cases/t00063.md | 2 +- docs/test_cases/t00064.md | 2 +- docs/test_cases/t00065.md | 2 +- docs/test_cases/t00066.md | 2 +- docs/test_cases/t00067.md | 2 +- docs/test_cases/t20001.md | 2 +- docs/test_cases/t20002.md | 2 +- docs/test_cases/t20003.md | 2 +- docs/test_cases/t20004.md | 2 +- docs/test_cases/t20005.md | 2 +- docs/test_cases/t20006.md | 2 +- docs/test_cases/t20007.md | 2 +- docs/test_cases/t20008.md | 2 +- docs/test_cases/t20009.md | 2 +- docs/test_cases/t20010.md | 2 +- docs/test_cases/t20011.md | 2 +- docs/test_cases/t20012.md | 2 +- docs/test_cases/t20013.md | 2 +- docs/test_cases/t20014.md | 2 +- docs/test_cases/t20015.md | 2 +- docs/test_cases/t20016.md | 2 +- docs/test_cases/t20017.md | 2 +- docs/test_cases/t20018.md | 2 +- docs/test_cases/t20019.md | 2 +- docs/test_cases/t20020.md | 2 +- docs/test_cases/t20021.md | 2 +- docs/test_cases/t20022.md | 2 +- docs/test_cases/t20023.md | 2 +- docs/test_cases/t20024.md | 2 +- docs/test_cases/t20025.md | 2 +- docs/test_cases/t20026.md | 2 +- docs/test_cases/t20027.md | 2 +- docs/test_cases/t20028.md | 2 +- docs/test_cases/t20029.md | 2 +- docs/test_cases/t20030.md | 2 +- docs/test_cases/t20031.md | 2 +- docs/test_cases/t20032.md | 2 +- docs/test_cases/t20033.md | 2 +- docs/test_cases/t20034.md | 2 +- docs/test_cases/t20035.md | 2 +- docs/test_cases/t20036.md | 2 +- docs/test_cases/t30001.md | 2 +- docs/test_cases/t30002.md | 2 +- docs/test_cases/t30003.md | 2 +- docs/test_cases/t30004.md | 2 +- docs/test_cases/t30005.md | 2 +- docs/test_cases/t30006.md | 2 +- docs/test_cases/t30007.md | 2 +- docs/test_cases/t30008.md | 2 +- docs/test_cases/t30009.md | 2 +- docs/test_cases/t30010.md | 2 +- docs/test_cases/t30011.md | 2 +- docs/test_cases/t40001.md | 2 +- docs/test_cases/t40002.md | 2 +- docs/test_cases/t40003.md | 2 +- docs/test_cases/t90000.md | 2 +- .../mermaid/class_diagram_generator.cc | 142 ++++++------------ .../mermaid/class_diagram_generator.h | 24 +-- src/common/generators/generators.h | 32 ++-- src/common/generators/mermaid/generator.cc | 24 +-- src/common/generators/mermaid/generator.h | 37 ++--- src/common/types.h | 2 +- src/config/schema.h | 15 ++ tests/t00002/.clang-uml | 2 +- tests/t00002/test_case.h | 8 +- tests/t00003/.clang-uml | 2 +- tests/t00003/test_case.h | 10 +- tests/t00004/.clang-uml | 2 +- tests/t00004/test_case.h | 10 +- tests/t00005/.clang-uml | 2 +- tests/t00005/test_case.h | 12 +- tests/t00006/.clang-uml | 2 +- tests/t00006/test_case.h | 12 +- tests/t00007/.clang-uml | 2 +- tests/t00007/test_case.h | 12 +- tests/t00008/.clang-uml | 2 +- tests/t00008/test_case.h | 12 +- tests/t00009/.clang-uml | 2 +- tests/t00009/test_case.h | 12 +- tests/t00010/.clang-uml | 2 +- tests/t00010/test_case.h | 12 +- tests/t00011/.clang-uml | 2 +- tests/t00011/test_case.h | 12 +- tests/t00012/.clang-uml | 2 +- tests/t00012/test_case.h | 12 +- tests/t00013/.clang-uml | 2 +- tests/t00013/test_case.h | 12 +- tests/t00014/.clang-uml | 7 +- tests/t00014/test_case.h | 13 +- tests/t00015/.clang-uml | 2 +- tests/t00015/test_case.h | 12 +- tests/t00016/.clang-uml | 2 +- tests/t00016/test_case.h | 12 +- tests/t00017/.clang-uml | 2 +- tests/t00017/test_case.h | 12 +- tests/t00018/.clang-uml | 2 +- tests/t00018/test_case.h | 12 +- tests/t00019/.clang-uml | 2 +- tests/t00019/test_case.h | 12 +- tests/t00020/.clang-uml | 2 +- tests/t00020/test_case.h | 12 +- tests/t00021/.clang-uml | 2 +- tests/t00021/test_case.h | 12 +- tests/t00022/.clang-uml | 2 +- tests/t00022/test_case.h | 10 +- tests/t00023/.clang-uml | 2 +- tests/t00023/test_case.h | 12 +- tests/t00024/.clang-uml | 2 +- tests/t00024/test_case.h | 12 +- tests/t00025/.clang-uml | 2 +- tests/t00025/test_case.h | 12 +- tests/t00026/.clang-uml | 2 +- tests/t00026/test_case.h | 12 +- tests/t00027/.clang-uml | 2 +- tests/t00027/test_case.h | 12 +- tests/t00028/.clang-uml | 2 +- tests/t00028/test_case.h | 12 +- tests/t00029/.clang-uml | 2 +- tests/t00029/test_case.h | 12 +- tests/t00030/.clang-uml | 2 +- tests/t00030/test_case.h | 12 +- tests/t00031/.clang-uml | 2 +- tests/t00031/test_case.h | 12 +- tests/t00032/.clang-uml | 2 +- tests/t00032/test_case.h | 12 +- tests/t00033/.clang-uml | 2 +- tests/t00033/test_case.h | 12 +- tests/t00034/.clang-uml | 2 +- tests/t00034/test_case.h | 12 +- tests/t00035/.clang-uml | 2 +- tests/t00035/test_case.h | 12 +- tests/t00036/.clang-uml | 2 +- tests/t00036/test_case.h | 12 +- tests/t00037/.clang-uml | 2 +- tests/t00037/test_case.h | 12 +- tests/t00038/.clang-uml | 2 +- tests/t00038/test_case.h | 12 +- tests/t00039/.clang-uml | 2 +- tests/t00039/test_case.h | 10 +- tests/t00040/.clang-uml | 2 +- tests/t00040/test_case.h | 12 +- tests/t00041/.clang-uml | 2 +- tests/t00041/test_case.h | 12 +- tests/t00042/.clang-uml | 2 +- tests/t00042/test_case.h | 12 +- tests/t00043/.clang-uml | 2 +- tests/t00043/test_case.h | 12 +- tests/t00044/.clang-uml | 2 +- tests/t00044/test_case.h | 12 +- tests/t00045/.clang-uml | 2 +- tests/t00045/test_case.h | 12 +- tests/t00046/.clang-uml | 2 +- tests/t00046/test_case.h | 12 +- tests/t00047/.clang-uml | 2 +- tests/t00047/test_case.h | 10 +- tests/t00048/.clang-uml | 2 +- tests/t00048/test_case.h | 10 +- tests/t00049/.clang-uml | 2 +- tests/t00049/test_case.h | 10 +- tests/t00050/.clang-uml | 2 +- tests/t00050/test_case.h | 10 +- tests/t00051/.clang-uml | 2 +- tests/t00051/test_case.h | 11 +- tests/t00052/.clang-uml | 2 +- tests/t00052/test_case.h | 10 +- tests/t00053/.clang-uml | 2 +- tests/t00053/test_case.h | 10 +- tests/t00054/.clang-uml | 2 +- tests/t00054/test_case.h | 10 +- tests/t00055/.clang-uml | 2 +- tests/t00055/test_case.h | 10 +- tests/t00056/.clang-uml | 2 +- tests/t00056/test_case.h | 10 +- tests/t00057/.clang-uml | 2 +- tests/t00057/test_case.h | 10 +- tests/t00058/.clang-uml | 2 +- tests/t00058/test_case.h | 10 +- tests/t00059/.clang-uml | 2 +- tests/t00059/test_case.h | 10 +- tests/t00060/.clang-uml | 2 +- tests/t00060/test_case.h | 10 +- tests/t00061/.clang-uml | 2 +- tests/t00061/test_case.h | 10 +- tests/t00062/.clang-uml | 2 +- tests/t00062/test_case.h | 10 +- tests/t00063/.clang-uml | 2 +- tests/t00063/test_case.h | 10 +- tests/t00064/.clang-uml | 2 +- tests/t00064/test_case.h | 10 +- tests/t00065/.clang-uml | 2 +- tests/t00065/test_case.h | 10 +- tests/t00066/.clang-uml | 2 +- tests/t00066/test_case.h | 10 +- tests/t00067/.clang-uml | 2 +- tests/t00067/test_case.h | 10 +- tests/t20001/.clang-uml | 2 +- tests/t20001/test_case.h | 5 +- tests/t20002/.clang-uml | 2 +- tests/t20002/test_case.h | 5 +- tests/t20003/.clang-uml | 2 +- tests/t20003/test_case.h | 5 +- tests/t20004/.clang-uml | 2 +- tests/t20004/test_case.h | 5 +- tests/t20005/.clang-uml | 2 +- tests/t20005/test_case.h | 5 +- tests/t20006/.clang-uml | 2 +- tests/t20006/test_case.h | 5 +- tests/t20007/.clang-uml | 2 +- tests/t20007/test_case.h | 5 +- tests/t20008/.clang-uml | 2 +- tests/t20008/test_case.h | 5 +- tests/t20009/.clang-uml | 2 +- tests/t20009/test_case.h | 5 +- tests/t20010/.clang-uml | 2 +- tests/t20010/test_case.h | 5 +- tests/t20011/.clang-uml | 2 +- tests/t20011/test_case.h | 5 +- tests/t20012/.clang-uml | 2 +- tests/t20012/test_case.h | 5 +- tests/t20013/.clang-uml | 2 +- tests/t20013/test_case.h | 5 +- tests/t20014/.clang-uml | 2 +- tests/t20014/test_case.h | 5 +- tests/t20015/.clang-uml | 2 +- tests/t20015/test_case.h | 5 +- tests/t20016/.clang-uml | 2 +- tests/t20016/test_case.h | 5 +- tests/t20017/.clang-uml | 2 +- tests/t20017/test_case.h | 5 +- tests/t20018/.clang-uml | 2 +- tests/t20018/test_case.h | 5 +- tests/t20019/.clang-uml | 2 +- tests/t20019/test_case.h | 5 +- tests/t20020/.clang-uml | 2 +- tests/t20020/test_case.h | 5 +- tests/t20021/.clang-uml | 2 +- tests/t20021/test_case.h | 5 +- tests/t20022/.clang-uml | 2 +- tests/t20022/test_case.h | 5 +- tests/t20023/.clang-uml | 2 +- tests/t20023/test_case.h | 5 +- tests/t20024/.clang-uml | 2 +- tests/t20024/test_case.h | 5 +- tests/t20025/.clang-uml | 2 +- tests/t20025/test_case.h | 5 +- tests/t20026/.clang-uml | 2 +- tests/t20026/test_case.h | 5 +- tests/t20027/.clang-uml | 2 +- tests/t20027/test_case.h | 5 +- tests/t20028/.clang-uml | 2 +- tests/t20028/test_case.h | 5 +- tests/t20029/.clang-uml | 2 +- tests/t20029/test_case.h | 5 +- tests/t20030/.clang-uml | 2 +- tests/t20030/test_case.h | 5 +- tests/t20031/.clang-uml | 2 +- tests/t20031/test_case.h | 5 +- tests/t20032/.clang-uml | 2 +- tests/t20032/test_case.h | 5 +- tests/t20033/.clang-uml | 2 +- tests/t20033/test_case.h | 5 +- tests/t20034/.clang-uml | 2 +- tests/t20034/test_case.h | 5 +- tests/t20035/.clang-uml | 2 +- tests/t20035/test_case.h | 5 +- tests/t20036/.clang-uml | 2 +- tests/t20036/test_case.h | 5 +- tests/t30001/.clang-uml | 2 +- tests/t30001/test_case.h | 5 +- tests/t30002/.clang-uml | 2 +- tests/t30002/test_case.h | 5 +- tests/t30003/.clang-uml | 2 +- tests/t30003/test_case.h | 5 +- tests/t30004/.clang-uml | 2 +- tests/t30004/test_case.h | 5 +- tests/t30005/.clang-uml | 2 +- tests/t30005/test_case.h | 5 +- tests/t30006/.clang-uml | 2 +- tests/t30006/test_case.h | 5 +- tests/t30007/.clang-uml | 2 +- tests/t30007/test_case.h | 5 +- tests/t30008/.clang-uml | 2 +- tests/t30008/test_case.h | 5 +- tests/t30009/.clang-uml | 2 +- tests/t30009/test_case.h | 5 +- tests/t30010/.clang-uml | 2 +- tests/t30010/test_case.h | 5 +- tests/t30011/.clang-uml | 2 +- tests/t30011/test_case.h | 5 +- tests/t40001/.clang-uml | 2 +- tests/t40001/test_case.h | 5 +- tests/t40002/.clang-uml | 2 +- tests/t40002/test_case.h | 5 +- tests/t40003/.clang-uml | 2 +- tests/t40003/test_case.h | 5 +- tests/t90000/.clang-uml | 2 +- tests/t90000/test_case.h | 2 +- tests/test_cases.cc | 49 +++--- tests/test_cases.h | 2 +- util/generate_mermaid.py | 47 ++++++ util/generate_test_cases_docs.py | 10 +- util/templates/test_cases/.clang-uml | 2 +- util/templates/test_cases/test_case.h | 4 +- util/validate_json.py | 46 ++++++ 372 files changed, 1102 insertions(+), 821 deletions(-) create mode 100644 util/generate_mermaid.py create mode 100644 util/validate_json.py diff --git a/Makefile b/Makefile index 5a07603f..ae3c0b04 100644 --- a/Makefile +++ b/Makefile @@ -93,10 +93,12 @@ test_release: release install: release make -C release install DESTDIR=${DESTDIR} -test_plantuml: test - plantuml -tsvg debug/tests/puml/*.puml +test_diagrams: test + plantuml -tsvg debug/tests/diagrams/puml/*.puml + python3 util/validate_json.py debug/tests/diagrams/json/*.json + python3 util/generate_mermaid.py debug/tests/diagrams/mermaid/*.mmd -document_test_cases: test_plantuml +document_test_cases: test_diagrams python3 util/generate_test_cases_docs.py python3 util/format_svg.py docs/test_cases/*.svg diff --git a/README.md b/README.md index 88f03fc9..5edf5ccd 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ which should be generated by `clang-uml`. Basic example is as follows: ```yaml compilation_database_dir: . -output_directory: puml +output_directory: diagrams diagrams: myproject_class: type: class diff --git a/docs/class_diagrams.md b/docs/class_diagrams.md index 611f02c3..26240c4f 100644 --- a/docs/class_diagrams.md +++ b/docs/class_diagrams.md @@ -18,7 +18,7 @@ The minimal config required to generate a class diagram is presented below: # Path to the directory where `compile_commands.json` can be found compilation_database_dir: _build # Output directory for the diagrams -output_directory: puml +output_directory: diagrams # Diagrams definitions diagrams: # Diagram name diff --git a/docs/include_diagrams.md b/docs/include_diagrams.md index b05f0fbf..0a2041e0 100644 --- a/docs/include_diagrams.md +++ b/docs/include_diagrams.md @@ -15,7 +15,7 @@ The minimal config required to generate an include diagram is presented below: # Path to the directory where `compile_commands.json` can be found compilation_database_dir: _build # Output directory for the diagrams -output_directory: puml +output_directory: diagrams # Diagrams definitions diagrams: # Diagram name diff --git a/docs/package_diagrams.md b/docs/package_diagrams.md index 58543cad..756e3b72 100644 --- a/docs/package_diagrams.md +++ b/docs/package_diagrams.md @@ -15,7 +15,7 @@ The minimal config required to generate a package diagram is presented below: # Path to the directory where `compile_commands.json` can be found compilation_database_dir: _build # Output directory for the diagrams -output_directory: puml +output_directory: diagrams # Diagrams definitions diagrams: # Diagram name diff --git a/docs/quick_start.md b/docs/quick_start.md index 5240f7c6..254a836a 100644 --- a/docs/quick_start.md +++ b/docs/quick_start.md @@ -17,7 +17,7 @@ To add an initial class diagram to your project, follow these steps: # Path to `compile_commands.json` directory compilation_database_dir: . # Path to diagram output directory - output_directory: puml + output_directory: diagrams diagrams: # This is the name of the diagram some_class_diagram: diff --git a/docs/sequence_diagrams.md b/docs/sequence_diagrams.md index 8fe0f54e..9f32dff9 100644 --- a/docs/sequence_diagrams.md +++ b/docs/sequence_diagrams.md @@ -17,7 +17,7 @@ The minimal config required to generate a sequence diagram is presented below: # Path to the directory where `compile_commands.json` can be found compilation_database_dir: _build # Output directory for the diagrams -output_directory: puml +output_directory: diagrams # Diagrams definitions diagrams: # Diagram name @@ -259,7 +259,7 @@ possible to override this order in the diagram definition using ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20029_sequence: type: sequence diff --git a/docs/test_cases/t00002.md b/docs/test_cases/t00002.md index 87e846f6..e36492f1 100644 --- a/docs/test_cases/t00002.md +++ b/docs/test_cases/t00002.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00002_class: type: class diff --git a/docs/test_cases/t00003.md b/docs/test_cases/t00003.md index 45740e26..f5c4d34e 100644 --- a/docs/test_cases/t00003.md +++ b/docs/test_cases/t00003.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00003_class: type: class diff --git a/docs/test_cases/t00004.md b/docs/test_cases/t00004.md index 4200fd7c..55005143 100644 --- a/docs/test_cases/t00004.md +++ b/docs/test_cases/t00004.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00004_class: type: class diff --git a/docs/test_cases/t00005.md b/docs/test_cases/t00005.md index 593827e8..9ab741bc 100644 --- a/docs/test_cases/t00005.md +++ b/docs/test_cases/t00005.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00005_class: type: class diff --git a/docs/test_cases/t00006.md b/docs/test_cases/t00006.md index 87e6e5ba..6bf1d77e 100644 --- a/docs/test_cases/t00006.md +++ b/docs/test_cases/t00006.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00006_class: type: class diff --git a/docs/test_cases/t00007.md b/docs/test_cases/t00007.md index d15b158e..7cb51a11 100644 --- a/docs/test_cases/t00007.md +++ b/docs/test_cases/t00007.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00007_class: type: class diff --git a/docs/test_cases/t00008.md b/docs/test_cases/t00008.md index 951054ad..ba236715 100644 --- a/docs/test_cases/t00008.md +++ b/docs/test_cases/t00008.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00008_class: type: class diff --git a/docs/test_cases/t00009.md b/docs/test_cases/t00009.md index 0355da0a..c71d264a 100644 --- a/docs/test_cases/t00009.md +++ b/docs/test_cases/t00009.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00009_class: type: class diff --git a/docs/test_cases/t00010.md b/docs/test_cases/t00010.md index ee0f92c7..e98defe3 100644 --- a/docs/test_cases/t00010.md +++ b/docs/test_cases/t00010.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00010_class: type: class diff --git a/docs/test_cases/t00011.md b/docs/test_cases/t00011.md index 2acaf086..595a9081 100644 --- a/docs/test_cases/t00011.md +++ b/docs/test_cases/t00011.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00011_class: type: class diff --git a/docs/test_cases/t00012.md b/docs/test_cases/t00012.md index 928cc425..daaf66f9 100644 --- a/docs/test_cases/t00012.md +++ b/docs/test_cases/t00012.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00012_class: type: class diff --git a/docs/test_cases/t00013.md b/docs/test_cases/t00013.md index 52d54c16..28b27b4a 100644 --- a/docs/test_cases/t00013.md +++ b/docs/test_cases/t00013.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00013_class: type: class diff --git a/docs/test_cases/t00014.md b/docs/test_cases/t00014.md index 58885733..71b713b2 100644 --- a/docs/test_cases/t00014.md +++ b/docs/test_cases/t00014.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00014_class: type: class diff --git a/docs/test_cases/t00015.md b/docs/test_cases/t00015.md index 21d85ca6..5ca19533 100644 --- a/docs/test_cases/t00015.md +++ b/docs/test_cases/t00015.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00015_class: type: class diff --git a/docs/test_cases/t00016.md b/docs/test_cases/t00016.md index 20ae6df8..c1ce09d6 100644 --- a/docs/test_cases/t00016.md +++ b/docs/test_cases/t00016.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00016_class: type: class diff --git a/docs/test_cases/t00017.md b/docs/test_cases/t00017.md index ed5f59ce..dbaeb11f 100644 --- a/docs/test_cases/t00017.md +++ b/docs/test_cases/t00017.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00017_class: type: class diff --git a/docs/test_cases/t00018.md b/docs/test_cases/t00018.md index cc9762bd..b87d9cdf 100644 --- a/docs/test_cases/t00018.md +++ b/docs/test_cases/t00018.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00018_class: type: class diff --git a/docs/test_cases/t00019.md b/docs/test_cases/t00019.md index 1651e8f3..ec164484 100644 --- a/docs/test_cases/t00019.md +++ b/docs/test_cases/t00019.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00019_class: type: class diff --git a/docs/test_cases/t00020.md b/docs/test_cases/t00020.md index b8b7ba2d..b4d9a8e9 100644 --- a/docs/test_cases/t00020.md +++ b/docs/test_cases/t00020.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00020_class: type: class diff --git a/docs/test_cases/t00021.md b/docs/test_cases/t00021.md index f9914636..7a70f81b 100644 --- a/docs/test_cases/t00021.md +++ b/docs/test_cases/t00021.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00021_class: type: class diff --git a/docs/test_cases/t00022.md b/docs/test_cases/t00022.md index 33b26714..253d4b4b 100644 --- a/docs/test_cases/t00022.md +++ b/docs/test_cases/t00022.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00022_class: type: class diff --git a/docs/test_cases/t00023.md b/docs/test_cases/t00023.md index 41abff3e..e7b7d97d 100644 --- a/docs/test_cases/t00023.md +++ b/docs/test_cases/t00023.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00023_class: type: class diff --git a/docs/test_cases/t00024.md b/docs/test_cases/t00024.md index b45ba2be..51aa05e7 100644 --- a/docs/test_cases/t00024.md +++ b/docs/test_cases/t00024.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00024_class: type: class diff --git a/docs/test_cases/t00025.md b/docs/test_cases/t00025.md index 96b3d860..e9b6dcf2 100644 --- a/docs/test_cases/t00025.md +++ b/docs/test_cases/t00025.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00025_class: type: class diff --git a/docs/test_cases/t00026.md b/docs/test_cases/t00026.md index f6d0343b..c26438e5 100644 --- a/docs/test_cases/t00026.md +++ b/docs/test_cases/t00026.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00026_class: type: class diff --git a/docs/test_cases/t00027.md b/docs/test_cases/t00027.md index 462e782d..5d72bec2 100644 --- a/docs/test_cases/t00027.md +++ b/docs/test_cases/t00027.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00027_class: type: class diff --git a/docs/test_cases/t00028.md b/docs/test_cases/t00028.md index 1e891cd4..e5485b47 100644 --- a/docs/test_cases/t00028.md +++ b/docs/test_cases/t00028.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00028_class: type: class diff --git a/docs/test_cases/t00029.md b/docs/test_cases/t00029.md index e8b5898d..880fa983 100644 --- a/docs/test_cases/t00029.md +++ b/docs/test_cases/t00029.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00029_class: type: class diff --git a/docs/test_cases/t00030.md b/docs/test_cases/t00030.md index f375d031..58e57173 100644 --- a/docs/test_cases/t00030.md +++ b/docs/test_cases/t00030.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00030_class: type: class diff --git a/docs/test_cases/t00031.md b/docs/test_cases/t00031.md index 456a1c3a..18c5cbab 100644 --- a/docs/test_cases/t00031.md +++ b/docs/test_cases/t00031.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00031_class: type: class diff --git a/docs/test_cases/t00032.md b/docs/test_cases/t00032.md index 8c5756a2..ebdec154 100644 --- a/docs/test_cases/t00032.md +++ b/docs/test_cases/t00032.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00032_class: type: class diff --git a/docs/test_cases/t00033.md b/docs/test_cases/t00033.md index 35542ceb..241c6c20 100644 --- a/docs/test_cases/t00033.md +++ b/docs/test_cases/t00033.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00033_class: type: class diff --git a/docs/test_cases/t00034.md b/docs/test_cases/t00034.md index 84570b84..1eada8f9 100644 --- a/docs/test_cases/t00034.md +++ b/docs/test_cases/t00034.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00034_class: type: class diff --git a/docs/test_cases/t00035.md b/docs/test_cases/t00035.md index 9939fe26..a6172637 100644 --- a/docs/test_cases/t00035.md +++ b/docs/test_cases/t00035.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00035_class: type: class diff --git a/docs/test_cases/t00036.md b/docs/test_cases/t00036.md index 3b68c378..508ee267 100644 --- a/docs/test_cases/t00036.md +++ b/docs/test_cases/t00036.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00036_class: type: class diff --git a/docs/test_cases/t00037.md b/docs/test_cases/t00037.md index 98d4409f..0f4eb8aa 100644 --- a/docs/test_cases/t00037.md +++ b/docs/test_cases/t00037.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00037_class: type: class diff --git a/docs/test_cases/t00038.md b/docs/test_cases/t00038.md index bf67d3cb..17ab9e44 100644 --- a/docs/test_cases/t00038.md +++ b/docs/test_cases/t00038.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00038_class: type: class diff --git a/docs/test_cases/t00039.md b/docs/test_cases/t00039.md index 826bd042..b7ac5aaf 100644 --- a/docs/test_cases/t00039.md +++ b/docs/test_cases/t00039.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00039_class: type: class diff --git a/docs/test_cases/t00040.md b/docs/test_cases/t00040.md index 9987b51a..daed1831 100644 --- a/docs/test_cases/t00040.md +++ b/docs/test_cases/t00040.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00040_class: type: class diff --git a/docs/test_cases/t00041.md b/docs/test_cases/t00041.md index 068b8344..70c8ed07 100644 --- a/docs/test_cases/t00041.md +++ b/docs/test_cases/t00041.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00041_class: type: class diff --git a/docs/test_cases/t00042.md b/docs/test_cases/t00042.md index 784356f9..b6c12cae 100644 --- a/docs/test_cases/t00042.md +++ b/docs/test_cases/t00042.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00042_class: type: class diff --git a/docs/test_cases/t00043.md b/docs/test_cases/t00043.md index 3de9ab65..4da12efb 100644 --- a/docs/test_cases/t00043.md +++ b/docs/test_cases/t00043.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00043_class: type: class diff --git a/docs/test_cases/t00044.md b/docs/test_cases/t00044.md index 26128337..c149a98b 100644 --- a/docs/test_cases/t00044.md +++ b/docs/test_cases/t00044.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00044_class: type: class diff --git a/docs/test_cases/t00045.md b/docs/test_cases/t00045.md index ddbd892a..0b5f4e99 100644 --- a/docs/test_cases/t00045.md +++ b/docs/test_cases/t00045.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00045_class: type: class diff --git a/docs/test_cases/t00046.md b/docs/test_cases/t00046.md index bce68ce3..fe400fcc 100644 --- a/docs/test_cases/t00046.md +++ b/docs/test_cases/t00046.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00046_class: type: class diff --git a/docs/test_cases/t00047.md b/docs/test_cases/t00047.md index d24e203b..e0dd5452 100644 --- a/docs/test_cases/t00047.md +++ b/docs/test_cases/t00047.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00047_class: type: class diff --git a/docs/test_cases/t00048.md b/docs/test_cases/t00048.md index 9a932067..97602829 100644 --- a/docs/test_cases/t00048.md +++ b/docs/test_cases/t00048.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00048_class: type: class diff --git a/docs/test_cases/t00049.md b/docs/test_cases/t00049.md index 708b2d5c..eee6b9de 100644 --- a/docs/test_cases/t00049.md +++ b/docs/test_cases/t00049.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00049_class: type: class diff --git a/docs/test_cases/t00050.md b/docs/test_cases/t00050.md index a233da47..6af63138 100644 --- a/docs/test_cases/t00050.md +++ b/docs/test_cases/t00050.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00050_class: type: class diff --git a/docs/test_cases/t00051.md b/docs/test_cases/t00051.md index f9b463c5..f779ab00 100644 --- a/docs/test_cases/t00051.md +++ b/docs/test_cases/t00051.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00051_class: type: class diff --git a/docs/test_cases/t00052.md b/docs/test_cases/t00052.md index 7a1854fc..074a6b2f 100644 --- a/docs/test_cases/t00052.md +++ b/docs/test_cases/t00052.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00052_class: type: class diff --git a/docs/test_cases/t00053.md b/docs/test_cases/t00053.md index 48f486eb..5bad95ef 100644 --- a/docs/test_cases/t00053.md +++ b/docs/test_cases/t00053.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00053_class: type: class diff --git a/docs/test_cases/t00054.md b/docs/test_cases/t00054.md index 96016cf9..e92614ff 100644 --- a/docs/test_cases/t00054.md +++ b/docs/test_cases/t00054.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00054_class: type: class diff --git a/docs/test_cases/t00055.md b/docs/test_cases/t00055.md index ae2cbd83..5b50b3e0 100644 --- a/docs/test_cases/t00055.md +++ b/docs/test_cases/t00055.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00055_class: type: class diff --git a/docs/test_cases/t00056.md b/docs/test_cases/t00056.md index 22737e67..d2e494ac 100644 --- a/docs/test_cases/t00056.md +++ b/docs/test_cases/t00056.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00056_class: type: class diff --git a/docs/test_cases/t00057.md b/docs/test_cases/t00057.md index 479b3839..7d9a7076 100644 --- a/docs/test_cases/t00057.md +++ b/docs/test_cases/t00057.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00057_class: type: class diff --git a/docs/test_cases/t00058.md b/docs/test_cases/t00058.md index b445768c..29b92be6 100644 --- a/docs/test_cases/t00058.md +++ b/docs/test_cases/t00058.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00058_class: type: class diff --git a/docs/test_cases/t00059.md b/docs/test_cases/t00059.md index 697d368b..f00dc70e 100644 --- a/docs/test_cases/t00059.md +++ b/docs/test_cases/t00059.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00059_class: type: class diff --git a/docs/test_cases/t00060.md b/docs/test_cases/t00060.md index f8b08e7a..fea43baa 100644 --- a/docs/test_cases/t00060.md +++ b/docs/test_cases/t00060.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00060_class: type: class diff --git a/docs/test_cases/t00061.md b/docs/test_cases/t00061.md index ee1771b8..5a1b99f6 100644 --- a/docs/test_cases/t00061.md +++ b/docs/test_cases/t00061.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00061_class: type: class diff --git a/docs/test_cases/t00062.md b/docs/test_cases/t00062.md index 76f740d2..33e3bed7 100644 --- a/docs/test_cases/t00062.md +++ b/docs/test_cases/t00062.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00062_class: type: class diff --git a/docs/test_cases/t00063.md b/docs/test_cases/t00063.md index a91dcf32..3cfd7028 100644 --- a/docs/test_cases/t00063.md +++ b/docs/test_cases/t00063.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00063_class: type: class diff --git a/docs/test_cases/t00064.md b/docs/test_cases/t00064.md index 90c15e14..8a632325 100644 --- a/docs/test_cases/t00064.md +++ b/docs/test_cases/t00064.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00064_class: type: class diff --git a/docs/test_cases/t00065.md b/docs/test_cases/t00065.md index 3dd1227c..cc219cf9 100644 --- a/docs/test_cases/t00065.md +++ b/docs/test_cases/t00065.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00065_class: type: class diff --git a/docs/test_cases/t00066.md b/docs/test_cases/t00066.md index 49953e27..a1a1ce84 100644 --- a/docs/test_cases/t00066.md +++ b/docs/test_cases/t00066.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00066_class: type: class diff --git a/docs/test_cases/t00067.md b/docs/test_cases/t00067.md index d6d5a79e..044dd2a7 100644 --- a/docs/test_cases/t00067.md +++ b/docs/test_cases/t00067.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00067_class: type: class diff --git a/docs/test_cases/t20001.md b/docs/test_cases/t20001.md index 45fd634e..02d86640 100644 --- a/docs/test_cases/t20001.md +++ b/docs/test_cases/t20001.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20001_sequence: type: sequence diff --git a/docs/test_cases/t20002.md b/docs/test_cases/t20002.md index 4469d224..6874730a 100644 --- a/docs/test_cases/t20002.md +++ b/docs/test_cases/t20002.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20002_sequence: type: sequence diff --git a/docs/test_cases/t20003.md b/docs/test_cases/t20003.md index f4dc9ab9..624e3366 100644 --- a/docs/test_cases/t20003.md +++ b/docs/test_cases/t20003.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20003_sequence: type: sequence diff --git a/docs/test_cases/t20004.md b/docs/test_cases/t20004.md index 8a9f41ad..75e7f0af 100644 --- a/docs/test_cases/t20004.md +++ b/docs/test_cases/t20004.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20004_sequence: type: sequence diff --git a/docs/test_cases/t20005.md b/docs/test_cases/t20005.md index ffcd06a5..e27f5940 100644 --- a/docs/test_cases/t20005.md +++ b/docs/test_cases/t20005.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20005_sequence: type: sequence diff --git a/docs/test_cases/t20006.md b/docs/test_cases/t20006.md index 8f31ad6c..414fbb69 100644 --- a/docs/test_cases/t20006.md +++ b/docs/test_cases/t20006.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20006_sequence: type: sequence diff --git a/docs/test_cases/t20007.md b/docs/test_cases/t20007.md index 4a098ee5..780cbe69 100644 --- a/docs/test_cases/t20007.md +++ b/docs/test_cases/t20007.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20007_sequence: type: sequence diff --git a/docs/test_cases/t20008.md b/docs/test_cases/t20008.md index d2e72e27..4878842d 100644 --- a/docs/test_cases/t20008.md +++ b/docs/test_cases/t20008.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20008_sequence: type: sequence diff --git a/docs/test_cases/t20009.md b/docs/test_cases/t20009.md index 3ad191c3..2194e5df 100644 --- a/docs/test_cases/t20009.md +++ b/docs/test_cases/t20009.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20009_sequence: type: sequence diff --git a/docs/test_cases/t20010.md b/docs/test_cases/t20010.md index f9a4a576..a67bff8b 100644 --- a/docs/test_cases/t20010.md +++ b/docs/test_cases/t20010.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20010_sequence: type: sequence diff --git a/docs/test_cases/t20011.md b/docs/test_cases/t20011.md index c354e5e2..84feb92e 100644 --- a/docs/test_cases/t20011.md +++ b/docs/test_cases/t20011.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20011_sequence: type: sequence diff --git a/docs/test_cases/t20012.md b/docs/test_cases/t20012.md index b1415c20..65999936 100644 --- a/docs/test_cases/t20012.md +++ b/docs/test_cases/t20012.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20012_sequence: type: sequence diff --git a/docs/test_cases/t20013.md b/docs/test_cases/t20013.md index 45c8d073..f5ac0dc6 100644 --- a/docs/test_cases/t20013.md +++ b/docs/test_cases/t20013.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20013_sequence: type: sequence diff --git a/docs/test_cases/t20014.md b/docs/test_cases/t20014.md index e6c9bc23..6beb752b 100644 --- a/docs/test_cases/t20014.md +++ b/docs/test_cases/t20014.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20014_sequence: type: sequence diff --git a/docs/test_cases/t20015.md b/docs/test_cases/t20015.md index aa3984e5..95567135 100644 --- a/docs/test_cases/t20015.md +++ b/docs/test_cases/t20015.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20015_sequence: type: sequence diff --git a/docs/test_cases/t20016.md b/docs/test_cases/t20016.md index 52f36349..adc8285d 100644 --- a/docs/test_cases/t20016.md +++ b/docs/test_cases/t20016.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20016_sequence: type: sequence diff --git a/docs/test_cases/t20017.md b/docs/test_cases/t20017.md index b09bedc5..d48751c7 100644 --- a/docs/test_cases/t20017.md +++ b/docs/test_cases/t20017.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20017_sequence: type: sequence diff --git a/docs/test_cases/t20018.md b/docs/test_cases/t20018.md index 6a7506a8..056d985c 100644 --- a/docs/test_cases/t20018.md +++ b/docs/test_cases/t20018.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20018_sequence: type: sequence diff --git a/docs/test_cases/t20019.md b/docs/test_cases/t20019.md index 7bd92ef5..b2abaa3b 100644 --- a/docs/test_cases/t20019.md +++ b/docs/test_cases/t20019.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20019_sequence: type: sequence diff --git a/docs/test_cases/t20020.md b/docs/test_cases/t20020.md index 322a4865..770ea4a1 100644 --- a/docs/test_cases/t20020.md +++ b/docs/test_cases/t20020.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20020_sequence: type: sequence diff --git a/docs/test_cases/t20021.md b/docs/test_cases/t20021.md index a3e7e81a..bcfd778f 100644 --- a/docs/test_cases/t20021.md +++ b/docs/test_cases/t20021.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20021_sequence: type: sequence diff --git a/docs/test_cases/t20022.md b/docs/test_cases/t20022.md index 89d5835c..9412e454 100644 --- a/docs/test_cases/t20022.md +++ b/docs/test_cases/t20022.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20022_sequence: type: sequence diff --git a/docs/test_cases/t20023.md b/docs/test_cases/t20023.md index fb13d0a1..a7b60c0f 100644 --- a/docs/test_cases/t20023.md +++ b/docs/test_cases/t20023.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20023_sequence: type: sequence diff --git a/docs/test_cases/t20024.md b/docs/test_cases/t20024.md index a60056cd..83f56170 100644 --- a/docs/test_cases/t20024.md +++ b/docs/test_cases/t20024.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20024_sequence: type: sequence diff --git a/docs/test_cases/t20025.md b/docs/test_cases/t20025.md index 5e9c2565..5fb534a7 100644 --- a/docs/test_cases/t20025.md +++ b/docs/test_cases/t20025.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20025_sequence: type: sequence diff --git a/docs/test_cases/t20026.md b/docs/test_cases/t20026.md index 15bf509f..4c0397df 100644 --- a/docs/test_cases/t20026.md +++ b/docs/test_cases/t20026.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20026_sequence: type: sequence diff --git a/docs/test_cases/t20027.md b/docs/test_cases/t20027.md index 70edc879..fd7ef6bf 100644 --- a/docs/test_cases/t20027.md +++ b/docs/test_cases/t20027.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20027_sequence: type: sequence diff --git a/docs/test_cases/t20028.md b/docs/test_cases/t20028.md index 10118fce..e89c4a2b 100644 --- a/docs/test_cases/t20028.md +++ b/docs/test_cases/t20028.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20028_sequence: type: sequence diff --git a/docs/test_cases/t20029.md b/docs/test_cases/t20029.md index 4601353b..7d2ab56a 100644 --- a/docs/test_cases/t20029.md +++ b/docs/test_cases/t20029.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20029_sequence: type: sequence diff --git a/docs/test_cases/t20030.md b/docs/test_cases/t20030.md index 90f8cb6b..f6c9be4a 100644 --- a/docs/test_cases/t20030.md +++ b/docs/test_cases/t20030.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20030_sequence: type: sequence diff --git a/docs/test_cases/t20031.md b/docs/test_cases/t20031.md index 7bbeb738..5ee55c41 100644 --- a/docs/test_cases/t20031.md +++ b/docs/test_cases/t20031.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20031_sequence: type: sequence diff --git a/docs/test_cases/t20032.md b/docs/test_cases/t20032.md index a4a1b541..9acdcd66 100644 --- a/docs/test_cases/t20032.md +++ b/docs/test_cases/t20032.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20032_sequence: type: sequence diff --git a/docs/test_cases/t20033.md b/docs/test_cases/t20033.md index e5b0632d..289783cc 100644 --- a/docs/test_cases/t20033.md +++ b/docs/test_cases/t20033.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20033_sequence: type: sequence diff --git a/docs/test_cases/t20034.md b/docs/test_cases/t20034.md index 8e570407..3f779b2b 100644 --- a/docs/test_cases/t20034.md +++ b/docs/test_cases/t20034.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20034_sequence: type: sequence diff --git a/docs/test_cases/t20035.md b/docs/test_cases/t20035.md index 74137990..608bae86 100644 --- a/docs/test_cases/t20035.md +++ b/docs/test_cases/t20035.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20035_sequence: type: sequence diff --git a/docs/test_cases/t20036.md b/docs/test_cases/t20036.md index 8f7cb08c..32ca367e 100644 --- a/docs/test_cases/t20036.md +++ b/docs/test_cases/t20036.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20036_sequence: type: sequence diff --git a/docs/test_cases/t30001.md b/docs/test_cases/t30001.md index 02be978b..8006c1b7 100644 --- a/docs/test_cases/t30001.md +++ b/docs/test_cases/t30001.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t30001_package: type: package diff --git a/docs/test_cases/t30002.md b/docs/test_cases/t30002.md index ec4b99e5..5e53ed7f 100644 --- a/docs/test_cases/t30002.md +++ b/docs/test_cases/t30002.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t30002_package: type: package diff --git a/docs/test_cases/t30003.md b/docs/test_cases/t30003.md index fc87a937..09d30327 100644 --- a/docs/test_cases/t30003.md +++ b/docs/test_cases/t30003.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t30003_package: type: package diff --git a/docs/test_cases/t30004.md b/docs/test_cases/t30004.md index e2005b0a..2303e078 100644 --- a/docs/test_cases/t30004.md +++ b/docs/test_cases/t30004.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t30004_package: type: package diff --git a/docs/test_cases/t30005.md b/docs/test_cases/t30005.md index 9b9ca455..2231e69f 100644 --- a/docs/test_cases/t30005.md +++ b/docs/test_cases/t30005.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t30005_package: type: package diff --git a/docs/test_cases/t30006.md b/docs/test_cases/t30006.md index 81909a20..62c2fcb4 100644 --- a/docs/test_cases/t30006.md +++ b/docs/test_cases/t30006.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t30006_package: type: package diff --git a/docs/test_cases/t30007.md b/docs/test_cases/t30007.md index 2298b863..88407edb 100644 --- a/docs/test_cases/t30007.md +++ b/docs/test_cases/t30007.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t30007_package: type: package diff --git a/docs/test_cases/t30008.md b/docs/test_cases/t30008.md index 7ed7b9d5..c6b305da 100644 --- a/docs/test_cases/t30008.md +++ b/docs/test_cases/t30008.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t30008_package: type: package diff --git a/docs/test_cases/t30009.md b/docs/test_cases/t30009.md index 7e88afbe..2e1eea17 100644 --- a/docs/test_cases/t30009.md +++ b/docs/test_cases/t30009.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t30009_package: type: package diff --git a/docs/test_cases/t30010.md b/docs/test_cases/t30010.md index d64f0317..d46dceba 100644 --- a/docs/test_cases/t30010.md +++ b/docs/test_cases/t30010.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t30010_package: type: package diff --git a/docs/test_cases/t30011.md b/docs/test_cases/t30011.md index 9fae3402..ad929ae9 100644 --- a/docs/test_cases/t30011.md +++ b/docs/test_cases/t30011.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t30011_package: type: package diff --git a/docs/test_cases/t40001.md b/docs/test_cases/t40001.md index 4693d820..bb63aacf 100644 --- a/docs/test_cases/t40001.md +++ b/docs/test_cases/t40001.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t40001_include: type: include diff --git a/docs/test_cases/t40002.md b/docs/test_cases/t40002.md index 77f4bd5e..78585bb8 100644 --- a/docs/test_cases/t40002.md +++ b/docs/test_cases/t40002.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t40002_include: type: include diff --git a/docs/test_cases/t40003.md b/docs/test_cases/t40003.md index 9069b526..0e6349e7 100644 --- a/docs/test_cases/t40003.md +++ b/docs/test_cases/t40003.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t40003_include: type: include diff --git a/docs/test_cases/t90000.md b/docs/test_cases/t90000.md index 95ffd5ff..aca68865 100644 --- a/docs/test_cases/t90000.md +++ b/docs/test_cases/t90000.md @@ -2,7 +2,7 @@ ## Config ```yaml compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t90000_class: type: class diff --git a/src/class_diagram/generators/mermaid/class_diagram_generator.cc b/src/class_diagram/generators/mermaid/class_diagram_generator.cc index f6c202a8..64fc15aa 100644 --- a/src/class_diagram/generators/mermaid/class_diagram_generator.cc +++ b/src/class_diagram/generators/mermaid/class_diagram_generator.cc @@ -24,9 +24,11 @@ namespace clanguml::class_diagram::generators::mermaid { +using clanguml::common::generators::mermaid::indent; + generator::generator(diagram_config &config, diagram_model &model) : common_generator{config, model} - , together_group_stack_{!config.generate_packages()} + , together_group_stack_{true} { } @@ -37,6 +39,8 @@ std::string generator::render_name(std::string name) const util::replace_all(name, "(", "("); util::replace_all(name, ")", ")"); util::replace_all(name, "##", "::"); + util::replace_all(name, "{", "{"); + util::replace_all(name, "}", "}"); return name; } @@ -44,11 +48,7 @@ std::string generator::render_name(std::string name) const void generator::generate_alias( const common::model::element &c, std::ostream &ostr) const { - std::string full_name; - if (config().generate_packages()) - full_name = c.full_name_no_ns(); - else - full_name = c.full_name(true); + const auto full_name = c.full_name(true); assert(!full_name.empty()); @@ -56,7 +56,8 @@ void generator::generate_alias( auto class_label = config().simplify_template_type(render_name(full_name)); - ostr << " class " << c.alias() << "[\"" << class_label << "\"]\n"; + ostr << indent(1) << "class " << c.alias() << "[\"" << class_label + << "\"]\n"; // Register the added alias m_generated_aliases.emplace(c.alias()); @@ -68,14 +69,14 @@ void generator::generate(const class_ &c, std::ostream &ostr) const std::string class_type{"class"}; - ostr << " class " << c.alias(); + ostr << indent(1) << "class " << c.alias(); ostr << " {" << '\n'; if (c.is_union()) - ostr << " <>\n"; + ostr << indent(2) << "<>\n"; else if (c.is_abstract()) - ostr << " <>\n"; + ostr << indent(2) << "<>\n"; // // Process methods @@ -130,7 +131,7 @@ void generator::generate(const class_ &c, std::ostream &ostr) const ostr << '\n'; } - ostr << " }" << '\n'; + ostr << indent(1) << "}" << '\n'; generate_notes(ostr, c); @@ -211,11 +212,9 @@ void generator::generate_method( print_debug(m, ostr); - std::string intend = " "; - std::string type{uns.relative(config().simplify_template_type(m.type()))}; - ostr << intend << mermaid_common::to_mermaid(m.access()) << m.name(); + ostr << indent(2) << mermaid_common::to_mermaid(m.access()) << m.name(); if (!m.template_params().empty()) { m.render_template_params(ostr, config().using_namespace(), false); @@ -257,7 +256,7 @@ void generator::generate_member( print_debug(m, ostr); - ostr << " " << mermaid_common::to_mermaid(m.access()) << m.name() + ostr << indent(2) << mermaid_common::to_mermaid(m.access()) << m.name() << " : " << render_name( uns.relative(config().simplify_template_type(m.type()))); @@ -265,31 +264,33 @@ void generator::generate_member( void generator::generate(const concept_ &c, std::ostream &ostr) const { - std::string class_type{"class"}; - - ostr << class_type << " " << c.alias() << " <>"; + ostr << indent(1) << "class" + << " " << c.alias(); if (!c.style().empty()) ostr << " " << c.style(); ostr << " {" << '\n'; + ostr << indent(2) << "<>\n"; // TODO: add option to enable/disable this if (c.requires_parameters().size() + c.requires_statements().size() > 0) { std::vector parameters; parameters.reserve(c.requires_parameters().size()); for (const auto &p : c.requires_parameters()) { - parameters.emplace_back(p.to_string(config().using_namespace())); + parameters.emplace_back( + render_name(p.to_string(config().using_namespace()))); } - ostr << fmt::format("({})\n", fmt::join(parameters, ",")); + ostr << indent(2) + << fmt::format("\"({})\"\n", fmt::join(parameters, ",")); - ostr << "..\n"; - - ostr << fmt::format("{}\n", fmt::join(c.requires_statements(), "\n")); + for (const auto &req : c.requires_statements()) { + ostr << indent(2) << fmt::format("\"{}\"\n", render_name(req)); + } } - ostr << " }" << '\n'; + ostr << indent(1) << "}" << '\n'; } void generator::generate_member_notes(std::ostream &ostr, @@ -298,10 +299,8 @@ void generator::generate_member_notes(std::ostream &ostr, for (const auto &decorator : member.decorators()) { auto note = std::dynamic_pointer_cast(decorator); if (note && note->applies_to_diagram(config().name)) { - ostr << "note " << note->position << " of " << alias - << "::" << member.name() << '\n' - << note->text << '\n' - << "end note\n"; + ostr << indent(1) << "note for " << alias << " \"" << note->text + << "\"" << '\n'; } } } @@ -411,7 +410,8 @@ void generator::generate_relationships( m_generated_aliases.end()) continue; - relstr << c.alias() << " " << puml_relation << " " << target_alias; + relstr << indent(1) << c.alias() << " " << puml_relation << " " + << target_alias; if (!r.label().empty()) { relstr << " : " << mermaid_common::to_mermaid(r.access()) @@ -419,7 +419,7 @@ void generator::generate_relationships( rendered_relations.emplace(r.label()); } - if(r.type() == relationship_t::kContainment) { + if (r.type() == relationship_t::kContainment) { relstr << " : [nested]\n"; } @@ -430,7 +430,7 @@ void generator::generate_relationships( LOG_DBG("=== Adding relation {}", relstr.str()); - all_relations_str << " " << relstr.str(); + all_relations_str << relstr.str(); } } catch (error::uml_alias_missing &e) { @@ -451,8 +451,9 @@ void generator::generate_relationships( m_generated_aliases.end()) continue; - relstr << target_alias << " <|-- " << c.alias() << '\n'; - all_relations_str << " " << relstr.str(); + relstr << indent(1) << target_alias << " <|-- " << c.alias() + << '\n'; + all_relations_str << relstr.str(); } catch (error::uml_alias_missing &e) { LOG_DBG("=== Skipping inheritance relation from {} to {} due " @@ -512,7 +513,8 @@ void generator::generate_relationships( m_generated_aliases.end()) continue; - relstr << c.alias() << " " << puml_relation << " " << target_alias; + relstr << indent(1) << c.alias() << " " << puml_relation << " " + << target_alias; if (!r.label().empty()) { relstr << " : " << mermaid_common::to_mermaid(r.access()) @@ -558,7 +560,7 @@ void generator::generate_relationships(const enum_ &e, std::ostream &ostr) const m_generated_aliases.end()) continue; - relstr << e.alias() << " " + relstr << indent(1) << e.alias() << " " << clanguml::common::generators::mermaid::to_mermaid( r.type(), r.style()) << " " << target_alias; @@ -568,7 +570,7 @@ void generator::generate_relationships(const enum_ &e, std::ostream &ostr) const relstr << '\n'; - ostr << " " << relstr.str(); + ostr << relstr.str(); } catch (error::uml_alias_missing &ex) { LOG_DBG("Skipping {} relation from {} to {} due " @@ -582,45 +584,23 @@ void generator::generate_relationships(const enum_ &e, std::ostream &ostr) const void generator::generate(const enum_ &e, std::ostream &ostr) const { - ostr << " class " << e.alias(); + ostr << indent(1) << "class " << e.alias(); ostr << " {" << '\n'; - ostr << " <>\n"; + ostr << indent(2) << "<>\n"; for (const auto &enum_constant : e.constants()) { - ostr << " " << enum_constant << '\n'; + ostr << indent(2) << enum_constant << '\n'; } - ostr << " }" << '\n'; + ostr << indent(1) << "}" << '\n'; generate_notes(ostr, e); } void generator::generate(const package &p, std::ostream &ostr) const { - const auto &uns = config().using_namespace(); - - if (config().generate_packages()) { - LOG_DBG("Generating package {}", p.name()); - - // Don't generate packages from namespaces filtered out by - // using_namespace - if (!uns.starts_with({p.full_name(false)})) { - print_debug(p, ostr); - ostr << "package [" << p.name() << "] "; - ostr << "as " << p.alias(); - - if (p.is_deprecated()) - ostr << " <>"; - - if (!p.style().empty()) - ostr << " " << p.style(); - - ostr << " {" << '\n'; - } - } - for (const auto &subpackage : p) { if (dynamic_cast(subpackage.get()) != nullptr) { // TODO: add option - generate_empty_packages @@ -676,39 +656,6 @@ void generator::generate(const package &p, std::ostream &ostr) const } } } - - if (config().generate_packages()) { - // Now generate any diagram elements which are in together - // groups - for (const auto &[group_name, group_elements] : - together_group_stack_.get_current_groups()) { - ostr << "together {\n"; - - for (auto *e : group_elements) { - if (auto *cls = dynamic_cast(e); cls) { - generate_alias(*cls, ostr); - generate(*cls, ostr); - } - if (auto *enm = dynamic_cast(e); enm) { - generate_alias(*enm, ostr); - generate(*enm, ostr); - } - if (auto *cpt = dynamic_cast(e); cpt) { - generate_alias(*cpt, ostr); - generate(*cpt, ostr); - } - } - - ostr << "}\n"; - } - - // Don't generate packages from namespaces filtered out by - // using_namespace - if (!uns.starts_with({p.full_name(false)})) { - ostr << "}" << '\n'; - generate_notes(ostr, p); - } - } } void generator::generate_relationships( @@ -817,7 +764,6 @@ void generator::generate_groups(std::ostream &ostr) const { for (const auto &[group_name, group_elements] : together_group_stack_.get_current_groups()) { - ostr << "together {\n"; for (auto *e : group_elements) { if (auto *cls = dynamic_cast(e); cls) { @@ -833,9 +779,7 @@ void generator::generate_groups(std::ostream &ostr) const generate(*cpt, ostr); } } - - ostr << "}\n"; } } -} // namespace clanguml::class_diagram::generators::plantuml +} // namespace clanguml::class_diagram::generators::mermaid diff --git a/src/class_diagram/generators/mermaid/class_diagram_generator.h b/src/class_diagram/generators/mermaid/class_diagram_generator.h index b08be5f7..5da861a7 100644 --- a/src/class_diagram/generators/mermaid/class_diagram_generator.h +++ b/src/class_diagram/generators/mermaid/class_diagram_generator.h @@ -91,7 +91,7 @@ public: void generate_top_level_elements(std::ostream &ostr) const; /** - * @brief Generate PlantUML alias for a class element. + * @brief Generate MermaidJS alias for a class element. * * @param c Class element * @param ostr Output stream @@ -100,7 +100,7 @@ public: const common::model::element &e, std::ostream &ostr) const; /** - * @brief Render class element to PlantUML + * @brief Render class element to MermaidJS * * @param c Class element * @param ostr Output stream @@ -108,7 +108,7 @@ public: void generate(const class_ &c, std::ostream &ostr) const; /** - * @brief Render class methods to PlantUML + * @brief Render class methods to MermaidJS * * @param methods List of class methods * @param ostr Output stream @@ -117,7 +117,7 @@ public: const std::vector &methods, std::ostream &ostr) const; /** - * @brief Render class methods to PlantUML in groups + * @brief Render class methods to MermaidJS in groups * * @param methods Methods grouped by method type * @param ostr Output stream @@ -126,7 +126,7 @@ public: const method_groups_t &methods, std::ostream &ostr) const; /** - * @brief Render class method to PlantUML + * @brief Render class method to MermaidJS * * @param m Class method * @param ostr Output stream @@ -134,7 +134,7 @@ public: void generate_method(const class_method &m, std::ostream &ostr) const; /** - * @brief Render class member to PlantUML + * @brief Render class member to MermaidJS * * @param m Class member * @param ostr Output stream @@ -142,7 +142,7 @@ public: void generate_member(const class_member &m, std::ostream &ostr) const; /** - * @brief Render all relationships in the diagram to PlantUML + * @brief Render all relationships in the diagram to MermaidJS * * @param ostr Output stream */ @@ -157,7 +157,7 @@ public: void generate_relationships(const class_ &c, std::ostream &ostr) const; /** - * @brief Render a specific relationship to PlantUML. + * @brief Render a specific relationship to MermaidJS. * * @param r Relationship model * @param rendered_relations Set of already rendered relationships, to @@ -168,7 +168,7 @@ public: const relationship &r, std::set &rendered_relations) const; /** - * @brief Render enum element to PlantUML + * @brief Render enum element to MermaidJS * * @param e Enum element * @param ostr Output stream @@ -184,7 +184,7 @@ public: void generate_relationships(const enum_ &c, std::ostream &ostr) const; /** - * @brief Render concept element to PlantUML + * @brief Render concept element to MermaidJS * * @param c Concept element * @param ostr Output stream @@ -200,7 +200,7 @@ public: void generate_relationships(const concept_ &c, std::ostream &ostr) const; /** - * @brief Render package element to PlantUML + * @brief Render package element to MermaidJS * * @param p Package element * @param ostr Output stream @@ -220,7 +220,7 @@ public: * * @param ostream Output stream * @param member Class element (member or method) - * @param alias PlantUML class alias + * @param alias MermaidJS class alias */ void generate_member_notes(std::ostream &ostream, const class_element &member, const std::string &alias) const; diff --git a/src/common/generators/generators.h b/src/common/generators/generators.h index b4d3b5c1..639a5fe6 100644 --- a/src/common/generators/generators.h +++ b/src/common/generators/generators.h @@ -18,8 +18,8 @@ #pragma once #include "class_diagram/generators/json/class_diagram_generator.h" -#include "class_diagram/generators/plantuml/class_diagram_generator.h" #include "class_diagram/generators/mermaid/class_diagram_generator.h" +#include "class_diagram/generators/plantuml/class_diagram_generator.h" #include "cli/cli_handler.h" #include "common/compilation_database.h" #include "common/generators/generators.h" @@ -168,21 +168,21 @@ struct diagram_generator_t { using type = clanguml::class_diagram::generators::mermaid::generator; }; -//template <> -//struct diagram_generator_t { -// using type = clanguml::sequence_diagram::generators::mermaid::generator; -//}; -//template <> -//struct diagram_generator_t { -// using type = clanguml::package_diagram::generators::mermaid::generator; -//}; -//template <> -//struct diagram_generator_t { -// using type = clanguml::include_diagram::generators::mermaid::generator; -//}; +// template <> +// struct diagram_generator_t { +// using type = clanguml::sequence_diagram::generators::mermaid::generator; +// }; +// template <> +// struct diagram_generator_t { +// using type = clanguml::package_diagram::generators::mermaid::generator; +// }; +// template <> +// struct diagram_generator_t { +// using type = clanguml::include_diagram::generators::mermaid::generator; +// }; /** @} */ /** diff --git a/src/common/generators/mermaid/generator.cc b/src/common/generators/mermaid/generator.cc index 3eea909a..740ac3cb 100644 --- a/src/common/generators/mermaid/generator.cc +++ b/src/common/generators/mermaid/generator.cc @@ -24,23 +24,23 @@ std::string to_mermaid(relationship_t r, const std::string &style) switch (r) { case relationship_t::kOwnership: case relationship_t::kComposition: - return style.empty() ? "*--" : fmt::format("*-[{}]-", style); + return "*--"; case relationship_t::kAggregation: - return style.empty() ? "o--" : fmt::format("o-[{}]-", style); + return "o--"; case relationship_t::kContainment: - return style.empty() ? "--" : fmt::format("-[{}]-", style); + return "--"; case relationship_t::kAssociation: - return style.empty() ? "-->" : fmt::format("-[{}]->", style); + return "-->"; case relationship_t::kInstantiation: - return style.empty() ? "..|>" : fmt::format(".[{}].|>", style); + return "..|>"; case relationship_t::kFriendship: - return style.empty() ? "<.." : fmt::format("<.[{}].", style); + return "<.."; case relationship_t::kDependency: - return style.empty() ? "..>" : fmt::format(".[{}].>", style); + return "..>"; case relationship_t::kConstraint: - return style.empty() ? "..>" : fmt::format(".[{}].>", style); + return "..>"; case relationship_t::kAlias: - return style.empty() ? ".." : fmt::format(".[{}].", style); + return ".."; default: return ""; } @@ -72,4 +72,10 @@ std::string to_mermaid(message_t r) } } +std::string indent(const unsigned level) +{ + const auto kIndentWidth = 4U; + return std::string(level * kIndentWidth, ' '); +} + } // namespace clanguml::common::generators::mermaid diff --git a/src/common/generators/mermaid/generator.h b/src/common/generators/mermaid/generator.h index 111448b8..7eee83c2 100644 --- a/src/common/generators/mermaid/generator.h +++ b/src/common/generators/mermaid/generator.h @@ -42,6 +42,8 @@ std::string to_mermaid(relationship_t r, const std::string &style); std::string to_mermaid(access_t scope); std::string to_mermaid(message_t r); +std::string indent(const unsigned level); + /** * @brief Base class for diagram generators * @@ -103,8 +105,9 @@ public: /** * @brief Generate MermaidJS directives from config file. * - * This method renders the MermaidJS directives provided in the configuration - * file, including resolving any element aliases and Jinja templates. + * This method renders the MermaidJS directives provided in the + * configuration file, including resolving any element aliases and Jinja + * templates. * * @param ostr Output stream * @param directives List of directives from the configuration file @@ -279,23 +282,21 @@ template void generator::generate_mermaid_directives( std::ostream &ostr, const std::vector &directives) const { - } template void generator::generate_notes( std::ostream &ostr, const model::element &e) const { -// const auto &config = generators::generator::config(); -// -// for (const auto &decorator : e.decorators()) { -// auto note = std::dynamic_pointer_cast(decorator); -// if (note && note->applies_to_diagram(config.name)) { -// ostr << "note " << note->position << " of " << e.alias() << '\n' -// << note->text << '\n' -// << "end note\n"; -// } -// } + const auto &config = generators::generator::config(); + + for (const auto &decorator : e.decorators()) { + auto note = std::dynamic_pointer_cast(decorator); + if (note && note->applies_to_diagram(config.name)) { + ostr << indent(1) << "note for " << e.alias() << " \"" << note->text + << "\"" << '\n'; + } + } } template @@ -305,9 +306,9 @@ void generator::generate_metadata(std::ostream &ostr) const if (config.generate_metadata()) { ostr << '\n' - << " %% Generated with clang-uml, version " + << "%% Generated with clang-uml, version " << clanguml::version::CLANG_UML_VERSION << '\n' - << " %% LLVM version " << clang::getClangFullVersion() << '\n'; + << "%% LLVM version " << clang::getClangFullVersion() << '\n'; } } @@ -318,7 +319,7 @@ void generator::print_debug( const auto &config = generators::generator::config(); if (config.debug_mode()) - ostr << " %% " << e.file() << ":" << e.line() << '\n'; + ostr << "%% " << e.file() << ":" << e.line() << '\n'; } template @@ -393,7 +394,7 @@ template void generator::init_env() }); // - // Add PlantUML specific functions + // Add MermaidJS specific functions // // Return the entire element JSON context based on element name @@ -411,7 +412,7 @@ template void generator::init_env() return res; }); - // Convert C++ entity to PlantUML alias, e.g. + // Convert C++ entity to MermaidJS alias, e.g. // "note left of {{ alias("A") }}: This is a note" // Shortcut to: // {{ element("A").alias }} diff --git a/src/common/types.h b/src/common/types.h index a3f828d6..272135bf 100644 --- a/src/common/types.h +++ b/src/common/types.h @@ -37,7 +37,7 @@ using id_t = int64_t; enum class generator_type_t { plantuml, /*!< Diagrams will be gnerated in PlantUML format */ json, /*!< Diagrams will be generated in JSON format */ - mermaid /*!< Diagrams will be generated in MermaidJS format */ + mermaid /*!< Diagrams will be generated in MermaidJS format */ }; std::string to_string(const std::string &s); diff --git a/src/config/schema.h b/src/config/schema.h index 54996bc8..a14e55fa 100644 --- a/src/config/schema.h +++ b/src/config/schema.h @@ -150,6 +150,9 @@ types: plantuml: !optional before: !optional [string] after: !optional [string] + mermaid: !optional + before: !optional [string] + after: !optional [string] relative_to: !optional string using_namespace: !optional [string, [string]] generate_metadata: !optional bool @@ -183,6 +186,9 @@ types: plantuml: !optional before: !optional [string] after: !optional [string] + mermaid: !optional + before: !optional [string] + after: !optional [string] relative_to: !optional string using_namespace: !optional [string, [string]] generate_metadata: !optional bool @@ -214,6 +220,9 @@ types: plantuml: !optional before: !optional [string] after: !optional [string] + mermaid: !optional + before: !optional [string] + after: !optional [string] relative_to: !optional string using_namespace: !optional [string, [string]] generate_metadata: !optional bool @@ -239,6 +248,9 @@ types: plantuml: !optional before: !optional [string] after: !optional [string] + mermaid: !optional + before: !optional [string] + after: !optional [string] relative_to: !optional string using_namespace: !optional [string, [string]] generate_metadata: !optional bool @@ -281,6 +293,9 @@ root: plantuml: !optional before: !optional [string] after: !optional [string] + mermaid: !optional + before: !optional [string] + after: !optional [string] relative_to: !optional string using_namespace: !optional [string, [string]] generate_metadata: !optional bool diff --git a/tests/t00002/.clang-uml b/tests/t00002/.clang-uml index c27c8e78..1bb1ed91 100644 --- a/tests/t00002/.clang-uml +++ b/tests/t00002/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00002_class: type: class diff --git a/tests/t00002/test_case.h b/tests/t00002/test_case.h index ec976f02..b376de34 100644 --- a/tests/t00002/test_case.h +++ b/tests/t00002/test_case.h @@ -85,8 +85,7 @@ TEST_CASE("t00002", "[test-case][class]") clanguml::util::get_git_commit()), "as")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -105,12 +104,11 @@ TEST_CASE("t00002", "[test-case][class]") REQUIRE(IsField(j, "E", "as", "std::vector")); REQUIRE(IsAssociation(j, "D", "A", "as")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } { auto mmd = generate_class_mermaid(diagram, *model); - save_puml( - config.output_directory() + "/" + diagram->name + ".mmd", mmd); + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); } } \ No newline at end of file diff --git a/tests/t00003/.clang-uml b/tests/t00003/.clang-uml index b783db86..e57c3032 100644 --- a/tests/t00003/.clang-uml +++ b/tests/t00003/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00003_class: type: class diff --git a/tests/t00003/test_case.h b/tests/t00003/test_case.h index c7cb2b7a..102ec684 100644 --- a/tests/t00003/test_case.h +++ b/tests/t00003/test_case.h @@ -73,8 +73,7 @@ TEST_CASE("t00003", "[test-case][class]") REQUIRE_THAT(puml, (IsField("b_", "int"))); REQUIRE_THAT(puml, (IsField("c_", "int"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -93,12 +92,11 @@ TEST_CASE("t00003", "[test-case][class]") REQUIRE(!IsDependency(j, "A", "A")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } { auto mmd = generate_class_mermaid(diagram, *model); - save_puml( - config.output_directory() + "/" + diagram->name + ".mmd", mmd); + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); } -} +} \ No newline at end of file diff --git a/tests/t00004/.clang-uml b/tests/t00004/.clang-uml index d9231e66..dceb4e5c 100644 --- a/tests/t00004/.clang-uml +++ b/tests/t00004/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00004_class: type: class diff --git a/tests/t00004/test_case.h b/tests/t00004/test_case.h index 316878fe..1fa72940 100644 --- a/tests/t00004/test_case.h +++ b/tests/t00004/test_case.h @@ -65,8 +65,7 @@ TEST_CASE("t00004", "[test-case][class]") REQUIRE_THAT(puml, IsClass(_A("detail::D::DD"))); REQUIRE_THAT(puml, IsEnum(_A("detail::D::AA"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -89,12 +88,11 @@ TEST_CASE("t00004", "[test-case][class]") REQUIRE(IsClass(j, "detail::D::DD")); REQUIRE(IsEnum(j, "detail::D::AA")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } { auto mmd = generate_class_mermaid(diagram, *model); - save_puml( - config.output_directory() + "/" + diagram->name + ".mmd", mmd); + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); } -} +} \ No newline at end of file diff --git a/tests/t00005/.clang-uml b/tests/t00005/.clang-uml index d433a5d5..010559a3 100644 --- a/tests/t00005/.clang-uml +++ b/tests/t00005/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00005_class: type: class diff --git a/tests/t00005/test_case.h b/tests/t00005/test_case.h index 0383deb9..375bf307 100644 --- a/tests/t00005/test_case.h +++ b/tests/t00005/test_case.h @@ -64,8 +64,7 @@ TEST_CASE("t00005", "[test-case][class]") REQUIRE_THAT(puml, IsAssociation(_A("R"), _A("J"), "+j")); REQUIRE_THAT(puml, IsAssociation(_A("R"), _A("K"), "+k")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -98,6 +97,11 @@ TEST_CASE("t00005", "[test-case][class]") REQUIRE(IsAssociation(j, "R", "J", "j")); REQUIRE(IsAssociation(j, "R", "K", "k")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00006/.clang-uml b/tests/t00006/.clang-uml index 9b44b117..1c2231a0 100644 --- a/tests/t00006/.clang-uml +++ b/tests/t00006/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00006_class: type: class diff --git a/tests/t00006/test_case.h b/tests/t00006/test_case.h index 3ed43aa1..dc676dac 100644 --- a/tests/t00006/test_case.h +++ b/tests/t00006/test_case.h @@ -73,8 +73,7 @@ TEST_CASE("t00006", "[test-case][class]") REQUIRE_THAT(puml, IsAggregation(_A("R"), _A("NN"), "+ns")); REQUIRE_THAT(puml, IsAggregation(_A("R"), _A("NNN"), "+ns")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -104,6 +103,11 @@ TEST_CASE("t00006", "[test-case][class]") REQUIRE(IsInstantiation( j, "custom_container", "custom_container")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00007/.clang-uml b/tests/t00007/.clang-uml index 6bd80b76..c6e2cab5 100644 --- a/tests/t00007/.clang-uml +++ b/tests/t00007/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00007_class: type: class diff --git a/tests/t00007/test_case.h b/tests/t00007/test_case.h index ce80ef52..0155b4d7 100644 --- a/tests/t00007/test_case.h +++ b/tests/t00007/test_case.h @@ -43,8 +43,7 @@ TEST_CASE("t00007", "[test-case][class]") REQUIRE_THAT(puml, IsAssociation(_A("R"), _A("B"), "+b")); REQUIRE_THAT(puml, IsAssociation(_A("R"), _A("C"), "+c")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -59,6 +58,11 @@ TEST_CASE("t00007", "[test-case][class]") REQUIRE(IsAssociation(j, "R", "B", "b")); REQUIRE(IsAssociation(j, "R", "C", "c")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00008/.clang-uml b/tests/t00008/.clang-uml index 07c18890..a46ad77c 100644 --- a/tests/t00008/.clang-uml +++ b/tests/t00008/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00008_class: type: class diff --git a/tests/t00008/test_case.h b/tests/t00008/test_case.h index f3288622..189cc2da 100644 --- a/tests/t00008/test_case.h +++ b/tests/t00008/test_case.h @@ -56,8 +56,7 @@ TEST_CASE("t00008", "[test-case][class]") IsInstantiation( _A("E::nested_template"), _A("E::nested_template"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -73,6 +72,11 @@ TEST_CASE("t00008", "[test-case][class]") REQUIRE(IsClassTemplate(j, "E::nested_template")); REQUIRE(IsClass(j, "E::nested_template")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00009/.clang-uml b/tests/t00009/.clang-uml index fd2b5b38..fe115036 100644 --- a/tests/t00009/.clang-uml +++ b/tests/t00009/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00009_class: type: class diff --git a/tests/t00009/test_case.h b/tests/t00009/test_case.h index cbcae450..d0d0b413 100644 --- a/tests/t00009/test_case.h +++ b/tests/t00009/test_case.h @@ -53,8 +53,7 @@ TEST_CASE("t00009", "[test-case][class]") IsAssociation( _A("B"), _A("A>"), "+avector")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -71,6 +70,11 @@ TEST_CASE("t00009", "[test-case][class]") REQUIRE(IsField(j, "B", "astring", "A *")); REQUIRE(IsField(j, "B", "avector", "A> &")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00010/.clang-uml b/tests/t00010/.clang-uml index 1388e6f1..40230948 100644 --- a/tests/t00010/.clang-uml +++ b/tests/t00010/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00010_class: type: class diff --git a/tests/t00010/test_case.h b/tests/t00010/test_case.h index b527ab49..c6d77578 100644 --- a/tests/t00010/test_case.h +++ b/tests/t00010/test_case.h @@ -48,8 +48,7 @@ TEST_CASE("t00010", "[test-case][class]") IsAggregation(_A("B"), _A("A"), "+astring")); REQUIRE_THAT(puml, IsAggregation(_A("C"), _A("B"), "+aintstring")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -64,6 +63,11 @@ TEST_CASE("t00010", "[test-case][class]") REQUIRE(IsField(j, "C", "aintstring", "B")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00011/.clang-uml b/tests/t00011/.clang-uml index 69ef8449..96f0f3bb 100644 --- a/tests/t00011/.clang-uml +++ b/tests/t00011/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00011_class: type: class diff --git a/tests/t00011/test_case.h b/tests/t00011/test_case.h index 99eabbdb..fd44377b 100644 --- a/tests/t00011/test_case.h +++ b/tests/t00011/test_case.h @@ -43,8 +43,7 @@ TEST_CASE("t00011", "[test-case][class]") REQUIRE_THAT(puml, IsFriend(_A("A"), _A("B"))); // REQUIRE_THAT(puml, IsFriend(_A("A"), _A("D"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -56,6 +55,11 @@ TEST_CASE("t00011", "[test-case][class]") REQUIRE(IsClassTemplate(j, "D")); REQUIRE(IsFriend(j, "A", "B")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00012/.clang-uml b/tests/t00012/.clang-uml index a841c472..bb52415c 100644 --- a/tests/t00012/.clang-uml +++ b/tests/t00012/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00012_class: type: class diff --git a/tests/t00012/test_case.h b/tests/t00012/test_case.h index 0d3d4d59..dd108370 100644 --- a/tests/t00012/test_case.h +++ b/tests/t00012/test_case.h @@ -46,8 +46,7 @@ TEST_CASE("t00012", "[test-case][class]") "std::vector>>>,3,3," "3>"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -62,6 +61,11 @@ TEST_CASE("t00012", "[test-case][class]") "C>>>" ",3,3,3>")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00013/.clang-uml b/tests/t00013/.clang-uml index 0b71bf39..60c3939d 100644 --- a/tests/t00013/.clang-uml +++ b/tests/t00013/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00013_class: type: class diff --git a/tests/t00013/test_case.h b/tests/t00013/test_case.h index 14db1799..aa1868bf 100644 --- a/tests/t00013/test_case.h +++ b/tests/t00013/test_case.h @@ -62,8 +62,7 @@ TEST_CASE("t00013", "[test-case][class]") IsInstantiation( _A("G"), _A("G"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -83,6 +82,11 @@ TEST_CASE("t00013", "[test-case][class]") REQUIRE(IsDependency(j, "R", "E")); REQUIRE(IsInstantiation(j, "G", "G")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00014/.clang-uml b/tests/t00014/.clang-uml index 9c3c64e6..59ebf08d 100644 --- a/tests/t00014/.clang-uml +++ b/tests/t00014/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00014_class: type: class @@ -12,4 +12,7 @@ diagrams: - clanguml::t00014 plantuml: before: - - left to right direction \ No newline at end of file + - left to right direction + mermaid: + before: + - direction LR \ No newline at end of file diff --git a/tests/t00014/test_case.h b/tests/t00014/test_case.h index 2fb40c44..5a68b6ed 100644 --- a/tests/t00014/test_case.h +++ b/tests/t00014/test_case.h @@ -146,8 +146,7 @@ TEST_CASE("t00014", "[test-case][class]") puml, IsDependency(_A("R"), _A("A"))); #endif - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -168,6 +167,12 @@ TEST_CASE("t00014", "[test-case][class]") REQUIRE(json::IsClass(j, "A")); REQUIRE(json::IsClass(j, "A")); REQUIRE(json::IsClass(j, "B")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00015/.clang-uml b/tests/t00015/.clang-uml index 38a6ceb5..205cf0a3 100644 --- a/tests/t00015/.clang-uml +++ b/tests/t00015/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00015_class: type: class diff --git a/tests/t00015/test_case.h b/tests/t00015/test_case.h index 604c968c..5c087886 100644 --- a/tests/t00015/test_case.h +++ b/tests/t00015/test_case.h @@ -40,8 +40,7 @@ TEST_CASE("t00015", "[test-case][class]") REQUIRE_THAT(puml, IsClass(_A("ns3::ns1::ns2::Anon"))); REQUIRE_THAT(puml, IsClass(_A("ns3::B"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -54,6 +53,11 @@ TEST_CASE("t00015", "[test-case][class]") REQUIRE(IsClass(j, "ns3::ns1::ns2::Anon")); REQUIRE(IsClass(j, "ns3::B")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00016/.clang-uml b/tests/t00016/.clang-uml index 31881559..300fb4b6 100644 --- a/tests/t00016/.clang-uml +++ b/tests/t00016/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00016_class: type: class diff --git a/tests/t00016/test_case.h b/tests/t00016/test_case.h index e4ead1e0..7acf4419 100644 --- a/tests/t00016/test_case.h +++ b/tests/t00016/test_case.h @@ -52,8 +52,7 @@ TEST_CASE("t00016", "[test-case][class]") IsInstantiation( _A("is_numeric"), _A("is_numeric"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -66,6 +65,11 @@ TEST_CASE("t00016", "[test-case][class]") REQUIRE(IsClass(j, "is_numeric")); REQUIRE(IsClass(j, "is_numeric")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00017/.clang-uml b/tests/t00017/.clang-uml index e6942ec3..d0f1302b 100644 --- a/tests/t00017/.clang-uml +++ b/tests/t00017/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00017_class: type: class diff --git a/tests/t00017/test_case.h b/tests/t00017/test_case.h index 41db6e1e..af74548e 100644 --- a/tests/t00017/test_case.h +++ b/tests/t00017/test_case.h @@ -68,8 +68,7 @@ TEST_CASE("t00017", "[test-case][class]") REQUIRE_THAT(puml, IsAssociation(_A("R"), _A("J"), "-j")); REQUIRE_THAT(puml, IsAssociation(_A("R"), _A("K"), "-k")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -89,6 +88,11 @@ TEST_CASE("t00017", "[test-case][class]") REQUIRE(IsClass(j, "K")); REQUIRE(IsClass(j, "R")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00018/.clang-uml b/tests/t00018/.clang-uml index ed13b17f..ab7fa538 100644 --- a/tests/t00018/.clang-uml +++ b/tests/t00018/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00018_class: type: class diff --git a/tests/t00018/test_case.h b/tests/t00018/test_case.h index a35be404..e19d434e 100644 --- a/tests/t00018/test_case.h +++ b/tests/t00018/test_case.h @@ -42,8 +42,7 @@ TEST_CASE("t00018", "[test-case][class]") REQUIRE_THAT(puml, IsDependency(_A("impl::widget"), _A("widget"))); REQUIRE_THAT(puml, !IsDependency(_A("widget"), _A("widget"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -54,6 +53,11 @@ TEST_CASE("t00018", "[test-case][class]") REQUIRE(IsClass(j, "impl::widget")); REQUIRE(IsDependency(j, "impl::widget", "widget")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00019/.clang-uml b/tests/t00019/.clang-uml index 6a6df084..b4c73903 100644 --- a/tests/t00019/.clang-uml +++ b/tests/t00019/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00019_class: type: class diff --git a/tests/t00019/test_case.h b/tests/t00019/test_case.h index 8b0a4332..90636ddd 100644 --- a/tests/t00019/test_case.h +++ b/tests/t00019/test_case.h @@ -69,8 +69,7 @@ TEST_CASE("t00019", "[test-case][class]") REQUIRE_THAT(puml, !IsAggregation(_A("A"), _A("Base"), "+layers")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -82,6 +81,11 @@ TEST_CASE("t00019", "[test-case][class]") REQUIRE(IsClassTemplate(j, "Layer2")); REQUIRE(IsClassTemplate(j, "Layer3")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00020/.clang-uml b/tests/t00020/.clang-uml index b24214be..5bac46fb 100644 --- a/tests/t00020/.clang-uml +++ b/tests/t00020/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00020_class: type: class diff --git a/tests/t00020/test_case.h b/tests/t00020/test_case.h index e712d770..4a67463b 100644 --- a/tests/t00020/test_case.h +++ b/tests/t00020/test_case.h @@ -44,8 +44,7 @@ TEST_CASE("t00020", "[test-case][class]") REQUIRE_THAT(puml, IsClass(_A("Factory1"))); REQUIRE_THAT(puml, IsClass(_A("Factory2"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -58,6 +57,11 @@ TEST_CASE("t00020", "[test-case][class]") REQUIRE(IsClass(j, "ProductB2")); REQUIRE(IsAbstractClass(j, "AbstractFactory")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00021/.clang-uml b/tests/t00021/.clang-uml index 0f7c063a..f221d426 100644 --- a/tests/t00021/.clang-uml +++ b/tests/t00021/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00021_class: type: class diff --git a/tests/t00021/test_case.h b/tests/t00021/test_case.h index 953f22a4..f951d5dc 100644 --- a/tests/t00021/test_case.h +++ b/tests/t00021/test_case.h @@ -42,8 +42,7 @@ TEST_CASE("t00021", "[test-case][class]") REQUIRE_THAT(puml, IsClass(_A("Visitor2"))); REQUIRE_THAT(puml, IsClass(_A("Visitor3"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -54,6 +53,11 @@ TEST_CASE("t00021", "[test-case][class]") REQUIRE(IsClass(j, "Visitor2")); REQUIRE(IsAbstractClass(j, "Item")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00022/.clang-uml b/tests/t00022/.clang-uml index 6cebb830..08421149 100644 --- a/tests/t00022/.clang-uml +++ b/tests/t00022/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00022_class: type: class diff --git a/tests/t00022/test_case.h b/tests/t00022/test_case.h index 6c258ab7..0d536a20 100644 --- a/tests/t00022/test_case.h +++ b/tests/t00022/test_case.h @@ -38,8 +38,7 @@ TEST_CASE("t00022", "[test-case][class]") REQUIRE_THAT(puml, IsClass(_A("A1"))); REQUIRE_THAT(puml, IsClass(_A("A2"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -50,6 +49,11 @@ TEST_CASE("t00022", "[test-case][class]") REQUIRE(IsClass(j, "A2")); REQUIRE(IsAbstractClass(j, "A")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); + } + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); } } diff --git a/tests/t00023/.clang-uml b/tests/t00023/.clang-uml index 90645897..145dd839 100644 --- a/tests/t00023/.clang-uml +++ b/tests/t00023/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00023_class: type: class diff --git a/tests/t00023/test_case.h b/tests/t00023/test_case.h index ba772ce6..245065fa 100644 --- a/tests/t00023/test_case.h +++ b/tests/t00023/test_case.h @@ -38,8 +38,7 @@ TEST_CASE("t00023", "[test-case][class]") REQUIRE_THAT(puml, IsClass(_A("StrategyA"))); REQUIRE_THAT(puml, IsClass(_A("StrategyB"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -50,6 +49,11 @@ TEST_CASE("t00023", "[test-case][class]") REQUIRE(IsClass(j, "StrategyB")); REQUIRE(IsAbstractClass(j, "Strategy")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00024/.clang-uml b/tests/t00024/.clang-uml index f8750c86..79c516f6 100644 --- a/tests/t00024/.clang-uml +++ b/tests/t00024/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00024_class: type: class diff --git a/tests/t00024/test_case.h b/tests/t00024/test_case.h index efd14550..d6f568de 100644 --- a/tests/t00024/test_case.h +++ b/tests/t00024/test_case.h @@ -42,8 +42,7 @@ TEST_CASE("t00024", "[test-case][class]") REQUIRE_THAT(puml, IsBaseClass(_A("Target"), _A("Target2"))); REQUIRE_THAT(puml, IsBaseClass(_A("Target"), _A("Proxy"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -57,6 +56,11 @@ TEST_CASE("t00024", "[test-case][class]") REQUIRE(IsBaseClass(j, "Target", "Target2")); REQUIRE(IsBaseClass(j, "Target", "Proxy")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00025/.clang-uml b/tests/t00025/.clang-uml index 4a32003c..1dd15940 100644 --- a/tests/t00025/.clang-uml +++ b/tests/t00025/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00025_class: type: class diff --git a/tests/t00025/test_case.h b/tests/t00025/test_case.h index ebf745b5..e4ee2950 100644 --- a/tests/t00025/test_case.h +++ b/tests/t00025/test_case.h @@ -52,8 +52,7 @@ TEST_CASE("t00025", "[test-case][class]") REQUIRE_THAT(puml, IsDependency(_A("Proxy"), _A("Target1"))); REQUIRE_THAT(puml, IsDependency(_A("Proxy"), _A("Target2"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -66,6 +65,11 @@ TEST_CASE("t00025", "[test-case][class]") REQUIRE(IsDependency(j, "Proxy", "Target1")); REQUIRE(IsDependency(j, "Proxy", "Target2")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00026/.clang-uml b/tests/t00026/.clang-uml index 33224cee..d406ef09 100644 --- a/tests/t00026/.clang-uml +++ b/tests/t00026/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00026_class: type: class diff --git a/tests/t00026/test_case.h b/tests/t00026/test_case.h index f2ea212c..070789ff 100644 --- a/tests/t00026/test_case.h +++ b/tests/t00026/test_case.h @@ -43,8 +43,7 @@ TEST_CASE("t00026", "[test-case][class]") REQUIRE_THAT(puml, IsInstantiation(_A("Caretaker"), _A("Caretaker"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -55,6 +54,11 @@ TEST_CASE("t00026", "[test-case][class]") REQUIRE(IsClassTemplate(j, "Originator")); REQUIRE(IsInstantiation(j, "Originator", "Originator")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00027/.clang-uml b/tests/t00027/.clang-uml index 27103b8e..64dc709e 100644 --- a/tests/t00027/.clang-uml +++ b/tests/t00027/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00027_class: type: class diff --git a/tests/t00027/test_case.h b/tests/t00027/test_case.h index 376ab6ab..02fa5290 100644 --- a/tests/t00027/test_case.h +++ b/tests/t00027/test_case.h @@ -56,8 +56,7 @@ TEST_CASE("t00027", "[test-case][class]") REQUIRE_THAT(puml, IsAggregation(_A("Window"), _A("Text"), "+description")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -75,6 +74,11 @@ TEST_CASE("t00027", "[test-case][class]") REQUIRE(IsAggregation( j, "Window", "Text", "description")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00028/.clang-uml b/tests/t00028/.clang-uml index 3588d932..ac0f8f09 100644 --- a/tests/t00028/.clang-uml +++ b/tests/t00028/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00028_class: type: class diff --git a/tests/t00028/test_case.h b/tests/t00028/test_case.h index 642d424a..1e0cf880 100644 --- a/tests/t00028/test_case.h +++ b/tests/t00028/test_case.h @@ -63,14 +63,18 @@ note.)"; REQUIRE_THAT( puml, HasMemberNote(_A("R"), "ccc", "left", "Reference to C.")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); using namespace json; - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00029/.clang-uml b/tests/t00029/.clang-uml index 9c673a31..b856a2cd 100644 --- a/tests/t00029/.clang-uml +++ b/tests/t00029/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00029_class: type: class diff --git a/tests/t00029/test_case.h b/tests/t00029/test_case.h index bafe9330..e7481ffa 100644 --- a/tests/t00029/test_case.h +++ b/tests/t00029/test_case.h @@ -53,8 +53,7 @@ TEST_CASE("t00029", "[test-case][class]") REQUIRE_THAT(puml, !IsAggregation(_A("R"), _A("G3"), "+g3")); REQUIRE_THAT(puml, IsAssociation(_A("R"), _A("G4"), "+g4")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -63,6 +62,11 @@ TEST_CASE("t00029", "[test-case][class]") REQUIRE(IsAggregation(j, "R", "G1", "g1")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00030/.clang-uml b/tests/t00030/.clang-uml index 1795565b..8c9e6b2c 100644 --- a/tests/t00030/.clang-uml +++ b/tests/t00030/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00030_class: type: class diff --git a/tests/t00030/test_case.h b/tests/t00030/test_case.h index 282943a7..42195fd4 100644 --- a/tests/t00030/test_case.h +++ b/tests/t00030/test_case.h @@ -48,8 +48,7 @@ TEST_CASE("t00030", "[test-case][class]") REQUIRE_THAT(puml, IsAssociation(_A("R"), _A("D"), "+ddd", "", "1")); REQUIRE_THAT(puml, IsAggregation(_A("R"), _A("E"), "+eee", "", "1")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -58,6 +57,11 @@ TEST_CASE("t00030", "[test-case][class]") REQUIRE(IsAggregation(j, "R", "C", "ccc")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00031/.clang-uml b/tests/t00031/.clang-uml index f06027c1..affa76b5 100644 --- a/tests/t00031/.clang-uml +++ b/tests/t00031/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00031_class: type: class diff --git a/tests/t00031/test_case.h b/tests/t00031/test_case.h index f86f88a0..b5d573ee 100644 --- a/tests/t00031/test_case.h +++ b/tests/t00031/test_case.h @@ -54,8 +54,7 @@ TEST_CASE("t00031", "[test-case][class]") IsAssociationWithStyle( _A("R"), _A("D"), "+ddd", "#blue,plain,thickness=16")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -65,6 +64,11 @@ TEST_CASE("t00031", "[test-case][class]") REQUIRE(IsClass(j, "A")); REQUIRE(IsClassTemplate(j, "C")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00032/.clang-uml b/tests/t00032/.clang-uml index 58018aa0..0c5d4e93 100644 --- a/tests/t00032/.clang-uml +++ b/tests/t00032/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00032_class: type: class diff --git a/tests/t00032/test_case.h b/tests/t00032/test_case.h index 587fd72f..52b69bef 100644 --- a/tests/t00032/test_case.h +++ b/tests/t00032/test_case.h @@ -62,8 +62,7 @@ TEST_CASE("t00032", "[test-case][class]") REQUIRE_THAT( puml, !IsDependency(_A("Overload"), _A("C"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -74,6 +73,11 @@ TEST_CASE("t00032", "[test-case][class]") "Overload")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00033/.clang-uml b/tests/t00033/.clang-uml index 5b474474..74d0bd30 100644 --- a/tests/t00033/.clang-uml +++ b/tests/t00033/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00033_class: type: class diff --git a/tests/t00033/test_case.h b/tests/t00033/test_case.h index f6a1e6da..e5d6d658 100644 --- a/tests/t00033/test_case.h +++ b/tests/t00033/test_case.h @@ -54,8 +54,7 @@ TEST_CASE("t00033", "[test-case][class]") REQUIRE_THAT(puml, IsInstantiation(_A("A"), _A("A>>>"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -70,6 +69,11 @@ TEST_CASE("t00033", "[test-case][class]") "clanguml::t00033::D>>>>", "B>>")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00034/.clang-uml b/tests/t00034/.clang-uml index 64c130fc..b8198a99 100644 --- a/tests/t00034/.clang-uml +++ b/tests/t00034/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00034_class: type: class diff --git a/tests/t00034/test_case.h b/tests/t00034/test_case.h index 03cc52f1..84766a52 100644 --- a/tests/t00034/test_case.h +++ b/tests/t00034/test_case.h @@ -46,8 +46,7 @@ TEST_CASE("t00034", "[test-case][class]") REQUIRE_THAT( puml, IsInstantiation(_A("drop_void"), _A("drop_void"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -57,6 +56,11 @@ TEST_CASE("t00034", "[test-case][class]") REQUIRE(IsClass(j, "A")); REQUIRE(IsClassTemplate(j, "lift_void")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00035/.clang-uml b/tests/t00035/.clang-uml index e2ab858d..ac19e302 100644 --- a/tests/t00035/.clang-uml +++ b/tests/t00035/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00035_class: type: class diff --git a/tests/t00035/test_case.h b/tests/t00035/test_case.h index 2da5cb57..e280e3bf 100644 --- a/tests/t00035/test_case.h +++ b/tests/t00035/test_case.h @@ -46,8 +46,7 @@ TEST_CASE("t00035", "[test-case][class]") REQUIRE_THAT(puml, IsLayoutHint(_A("Center"), "right", _A("Right"))); REQUIRE_THAT(puml, IsLayoutHint(_A("Center"), "down", _A("Bottom"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -60,6 +59,11 @@ TEST_CASE("t00035", "[test-case][class]") REQUIRE(IsClass(j, "Left")); REQUIRE(IsClass(j, "Right")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00036/.clang-uml b/tests/t00036/.clang-uml index 0c09a1c0..87ac943a 100644 --- a/tests/t00036/.clang-uml +++ b/tests/t00036/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00036_class: type: class diff --git a/tests/t00036/test_case.h b/tests/t00036/test_case.h index fe307bcb..8018919a 100644 --- a/tests/t00036/test_case.h +++ b/tests/t00036/test_case.h @@ -49,8 +49,7 @@ TEST_CASE("t00036", "[test-case][class]") REQUIRE_THAT(puml, IsAggregation(_A("B"), _A("A"), "+a_int")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -67,6 +66,11 @@ TEST_CASE("t00036", "[test-case][class]") REQUIRE(IsPackage(j, "ns1::ns11::ns111")); REQUIRE(IsPackage(j, "ns2")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00037/.clang-uml b/tests/t00037/.clang-uml index 9a8cd532..f2616bd8 100644 --- a/tests/t00037/.clang-uml +++ b/tests/t00037/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00037_class: type: class diff --git a/tests/t00037/test_case.h b/tests/t00037/test_case.h index e3b20bd8..c622a63c 100644 --- a/tests/t00037/test_case.h +++ b/tests/t00037/test_case.h @@ -45,8 +45,7 @@ TEST_CASE("t00037", "[test-case][class]") REQUIRE_THAT( puml, IsAggregation(_A("ST"), _A("ST::(units)"), "-units")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -59,6 +58,11 @@ TEST_CASE("t00037", "[test-case][class]") REQUIRE(IsClass(j, "ST::(dimensions)")); REQUIRE(IsAggregation(j, "ST", "ST::(dimensions)", "dimensions")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00038/.clang-uml b/tests/t00038/.clang-uml index a0f321ac..ab17a394 100644 --- a/tests/t00038/.clang-uml +++ b/tests/t00038/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00038_class: type: class diff --git a/tests/t00038/test_case.h b/tests/t00038/test_case.h index b253ef73..cae0a9a2 100644 --- a/tests/t00038/test_case.h +++ b/tests/t00038/test_case.h @@ -96,8 +96,7 @@ TEST_CASE("t00038", "[test-case][class]") _A("map>"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -108,6 +107,11 @@ TEST_CASE("t00038", "[test-case][class]") REQUIRE(IsClass(j, "B")); REQUIRE(IsClass(j, "C")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00039/.clang-uml b/tests/t00039/.clang-uml index 4ba5bdca..31a1d55c 100644 --- a/tests/t00039/.clang-uml +++ b/tests/t00039/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00039_class: type: class diff --git a/tests/t00039/test_case.h b/tests/t00039/test_case.h index e3871e20..358af15c 100644 --- a/tests/t00039/test_case.h +++ b/tests/t00039/test_case.h @@ -63,8 +63,7 @@ TEST_CASE("t00039", "[test-case][class]") REQUIRE_THAT(puml, IsClassTemplate("ns3::FE", "T,M")); REQUIRE_THAT(puml, IsClassTemplate("ns3::FFF", "T,M,N")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -84,6 +83,11 @@ TEST_CASE("t00039", "[test-case][class]") REQUIRE(IsClassTemplate(j, "ns3::F")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); + } + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); } } diff --git a/tests/t00040/.clang-uml b/tests/t00040/.clang-uml index 20744d33..ea120d19 100644 --- a/tests/t00040/.clang-uml +++ b/tests/t00040/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00040_class: type: class diff --git a/tests/t00040/test_case.h b/tests/t00040/test_case.h index 7d58e4b6..c2e48012 100644 --- a/tests/t00040/test_case.h +++ b/tests/t00040/test_case.h @@ -45,8 +45,7 @@ TEST_CASE("t00040", "[test-case][class]") REQUIRE_THAT(puml, !IsDependency(_A("R"), _A("A"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -57,6 +56,11 @@ TEST_CASE("t00040", "[test-case][class]") REQUIRE(IsClass(j, "AA")); REQUIRE(IsClass(j, "AAA")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00041/.clang-uml b/tests/t00041/.clang-uml index 502eba3f..191ba681 100644 --- a/tests/t00041/.clang-uml +++ b/tests/t00041/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00041_class: type: class diff --git a/tests/t00041/test_case.h b/tests/t00041/test_case.h index 9d1e634e..f84812d1 100644 --- a/tests/t00041/test_case.h +++ b/tests/t00041/test_case.h @@ -65,8 +65,7 @@ TEST_CASE("t00041", "[test-case][class]") REQUIRE_THAT(puml, IsBaseClass(_A("ns1::N"), _A("ns1::NN"))); REQUIRE_THAT(puml, IsBaseClass(_A("ns1::N"), _A("ns1::NM"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -83,6 +82,11 @@ TEST_CASE("t00041", "[test-case][class]") REQUIRE(IsAssociation(j, "D", "RR", "rr")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00042/.clang-uml b/tests/t00042/.clang-uml index c15333de..cdd55719 100644 --- a/tests/t00042/.clang-uml +++ b/tests/t00042/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00042_class: type: class diff --git a/tests/t00042/test_case.h b/tests/t00042/test_case.h index 3b662d5c..3de29443 100644 --- a/tests/t00042/test_case.h +++ b/tests/t00042/test_case.h @@ -40,8 +40,7 @@ TEST_CASE("t00042", "[test-case][class]") REQUIRE_THAT(puml, IsClassTemplate("B", "T,K")); REQUIRE_THAT(puml, !IsClassTemplate("C", "T")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -51,6 +50,11 @@ TEST_CASE("t00042", "[test-case][class]") REQUIRE(IsClassTemplate(j, "A")); REQUIRE(IsClassTemplate(j, "B")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00043/.clang-uml b/tests/t00043/.clang-uml index 404fc413..6ca42b14 100644 --- a/tests/t00043/.clang-uml +++ b/tests/t00043/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00043_class: type: class diff --git a/tests/t00043/test_case.h b/tests/t00043/test_case.h index 58f1ca9f..b2fadaa2 100644 --- a/tests/t00043/test_case.h +++ b/tests/t00043/test_case.h @@ -63,8 +63,7 @@ TEST_CASE("t00043", "[test-case][class]") REQUIRE_THAT(puml, IsDependency(_A("I"), _A("H"))); REQUIRE_THAT(puml, IsDependency(_A("J"), _A("I"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -85,6 +84,11 @@ TEST_CASE("t00043", "[test-case][class]") REQUIRE(IsDependency(j, "dependencies::J", "dependencies::I")); REQUIRE(IsDependency(j, "dependencies::H", "dependencies::G")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00044/.clang-uml b/tests/t00044/.clang-uml index 69dab8ac..b0e819d2 100644 --- a/tests/t00044/.clang-uml +++ b/tests/t00044/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00044_class: type: class diff --git a/tests/t00044/test_case.h b/tests/t00044/test_case.h index ef2010e3..831a0d34 100644 --- a/tests/t00044/test_case.h +++ b/tests/t00044/test_case.h @@ -64,8 +64,7 @@ TEST_CASE("t00044", "[test-case][class]") IsInstantiation(_A("signal_handler"), _A("signal_handler"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -80,6 +79,11 @@ TEST_CASE("t00044", "[test-case][class]") j, "sink>")); REQUIRE(IsClass(j, "R")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00045/.clang-uml b/tests/t00045/.clang-uml index 84b35cfc..51184d16 100644 --- a/tests/t00045/.clang-uml +++ b/tests/t00045/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00045_class: type: class diff --git a/tests/t00045/test_case.h b/tests/t00045/test_case.h index c198c0e2..35965dd2 100644 --- a/tests/t00045/test_case.h +++ b/tests/t00045/test_case.h @@ -66,8 +66,7 @@ TEST_CASE("t00045", "[test-case][class]") // REQUIRE_THAT(puml, IsFriend(_A("ns1::ns2::R"), // _A("AAAA"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -85,6 +84,11 @@ TEST_CASE("t00045", "[test-case][class]") REQUIRE(IsBaseClass(j, "ns1::ns2::A", "ns1::ns2::B")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00046/.clang-uml b/tests/t00046/.clang-uml index cea73ccf..9a3b0f50 100644 --- a/tests/t00046/.clang-uml +++ b/tests/t00046/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00046_class: type: class diff --git a/tests/t00046/test_case.h b/tests/t00046/test_case.h index bae8a3c1..d79a5ee4 100644 --- a/tests/t00046/test_case.h +++ b/tests/t00046/test_case.h @@ -43,8 +43,7 @@ TEST_CASE("t00046", "[test-case][class]") REQUIRE_THAT(puml, IsField("i", "std::vector")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -56,6 +55,11 @@ TEST_CASE("t00046", "[test-case][class]") REQUIRE(get_element(j, "ns1::A").value()["type"] == "class"); REQUIRE(get_element(j, "ns1::ns2::D").value()["type"] == "class"); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } -} + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); + } +} \ No newline at end of file diff --git a/tests/t00047/.clang-uml b/tests/t00047/.clang-uml index 9ea39aed..0072a2cc 100644 --- a/tests/t00047/.clang-uml +++ b/tests/t00047/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00047_class: type: class diff --git a/tests/t00047/test_case.h b/tests/t00047/test_case.h index 4a83feb2..3398fe1e 100644 --- a/tests/t00047/test_case.h +++ b/tests/t00047/test_case.h @@ -43,8 +43,7 @@ TEST_CASE("t00047", "[test-case][class]") REQUIRE_THAT(puml, IsClassTemplate("conditional_t", "std::false_type,Result,Tail...")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -56,6 +55,11 @@ TEST_CASE("t00047", "[test-case][class]") REQUIRE(IsClass(j, "conditional_t")); REQUIRE(IsClass(j, "conditional_t")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); + } + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); } } \ No newline at end of file diff --git a/tests/t00048/.clang-uml b/tests/t00048/.clang-uml index e3e44fbc..ecbc732a 100644 --- a/tests/t00048/.clang-uml +++ b/tests/t00048/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00048_class: type: class diff --git a/tests/t00048/test_case.h b/tests/t00048/test_case.h index 3cd4616f..7c19e9e5 100644 --- a/tests/t00048/test_case.h +++ b/tests/t00048/test_case.h @@ -49,8 +49,7 @@ TEST_CASE("t00048", "[test-case][class]") REQUIRE_THAT(puml, IsBaseClass(_A("Base"), _A("A"))); REQUIRE_THAT(puml, IsBaseClass(_A("Base"), _A("B"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -64,6 +63,11 @@ TEST_CASE("t00048", "[test-case][class]") REQUIRE(IsBaseClass(j, "Base", "A")); REQUIRE(IsBaseClass(j, "Base", "B")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); + } + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); } } \ No newline at end of file diff --git a/tests/t00049/.clang-uml b/tests/t00049/.clang-uml index b8653678..13eb1cea 100644 --- a/tests/t00049/.clang-uml +++ b/tests/t00049/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00049_class: type: class diff --git a/tests/t00049/test_case.h b/tests/t00049/test_case.h index 1b94a090..1fb001eb 100644 --- a/tests/t00049/test_case.h +++ b/tests/t00049/test_case.h @@ -57,8 +57,7 @@ TEST_CASE("t00049", "[test-case][class]") REQUIRE_THAT(puml, IsInstantiation(_A("A"), _A("A"))); REQUIRE_THAT(puml, IsInstantiation(_A("A"), _A("A"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -69,6 +68,11 @@ TEST_CASE("t00049", "[test-case][class]") REQUIRE(IsClassTemplate(j, "A")); REQUIRE(IsInstantiation(j, "A", "A")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); + } + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); } } \ No newline at end of file diff --git a/tests/t00050/.clang-uml b/tests/t00050/.clang-uml index bf7ef914..2b06a49d 100644 --- a/tests/t00050/.clang-uml +++ b/tests/t00050/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00050_class: type: class diff --git a/tests/t00050/test_case.h b/tests/t00050/test_case.h index 5f4ae9f0..5e5d5bf6 100644 --- a/tests/t00050/test_case.h +++ b/tests/t00050/test_case.h @@ -54,8 +54,7 @@ TEST_CASE("t00050", "[test-case][class]") REQUIRE_THAT(puml, HasNote(_A("G"), "bottom")); REQUIRE_THAT(puml, HasNote(_A("G"), "right")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -68,6 +67,11 @@ TEST_CASE("t00050", "[test-case][class]") REQUIRE(IsClass(j, "utils::D")); REQUIRE(IsEnum(j, "E")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); + } + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); } } \ No newline at end of file diff --git a/tests/t00051/.clang-uml b/tests/t00051/.clang-uml index 4cb46059..1e6daa3a 100644 --- a/tests/t00051/.clang-uml +++ b/tests/t00051/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00051_class: type: class diff --git a/tests/t00051/test_case.h b/tests/t00051/test_case.h index a90f27b9..dece426e 100644 --- a/tests/t00051/test_case.h +++ b/tests/t00051/test_case.h @@ -73,10 +73,8 @@ TEST_CASE("t00051", "[test-case][class]") _A("B<(lambda at ../../tests/t00051/t00051.cc:43:18),(lambda " "at ../../tests/t00051/t00051.cc:43:27)>"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } - { auto j = generate_class_json(diagram, *model); @@ -86,6 +84,11 @@ TEST_CASE("t00051", "[test-case][class]") REQUIRE(IsInnerClass(j, "A", "A::custom_thread1")); REQUIRE(IsInnerClass(j, "A", "A::custom_thread2")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); + } + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); } } \ No newline at end of file diff --git a/tests/t00052/.clang-uml b/tests/t00052/.clang-uml index c02dbe15..aa5a68c0 100644 --- a/tests/t00052/.clang-uml +++ b/tests/t00052/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00052_class: type: class diff --git a/tests/t00052/test_case.h b/tests/t00052/test_case.h index b15b080a..0971db6a 100644 --- a/tests/t00052/test_case.h +++ b/tests/t00052/test_case.h @@ -48,8 +48,7 @@ TEST_CASE("t00052", "[test-case][class]") REQUIRE_THAT(puml, (IsMethod("b", "T", "T t"))); REQUIRE_THAT(puml, (IsMethod("bb", "T", "F && f, T t"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -59,6 +58,11 @@ TEST_CASE("t00052", "[test-case][class]") REQUIRE(IsClass(j, "A")); REQUIRE(IsClassTemplate(j, "B")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); + } + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); } } \ No newline at end of file diff --git a/tests/t00053/.clang-uml b/tests/t00053/.clang-uml index 45e67c0b..628a1237 100644 --- a/tests/t00053/.clang-uml +++ b/tests/t00053/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00053_class: type: class diff --git a/tests/t00053/test_case.h b/tests/t00053/test_case.h index 71edfe48..fe4923c4 100644 --- a/tests/t00053/test_case.h +++ b/tests/t00053/test_case.h @@ -52,8 +52,7 @@ TEST_CASE("t00053", "[test-case][class]") REQUIRE_THAT(puml, IsClass(_A("F"))); REQUIRE_THAT(puml, IsClass(_A("G"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -77,6 +76,11 @@ TEST_CASE("t00053", "[test-case][class]") REQUIRE(IsClass(j, "F")); REQUIRE(IsClass(j, "G")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); + } + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); } } \ No newline at end of file diff --git a/tests/t00054/.clang-uml b/tests/t00054/.clang-uml index 3bd9b035..6000cf79 100644 --- a/tests/t00054/.clang-uml +++ b/tests/t00054/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00054_class: type: class diff --git a/tests/t00054/test_case.h b/tests/t00054/test_case.h index b7cdecd9..b844e394 100644 --- a/tests/t00054/test_case.h +++ b/tests/t00054/test_case.h @@ -56,8 +56,7 @@ TEST_CASE("t00054", "[test-case][class]") REQUIRE_THAT(puml, IsEnum(_A("h"))); REQUIRE_THAT(puml, IsEnum(_A("j"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -85,6 +84,11 @@ TEST_CASE("t00054", "[test-case][class]") REQUIRE(IsEnum(j, "detail4::h")); REQUIRE(IsEnum(j, "detail4::j")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); + } + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); } } \ No newline at end of file diff --git a/tests/t00055/.clang-uml b/tests/t00055/.clang-uml index f7bcd5b2..88c6a6f2 100644 --- a/tests/t00055/.clang-uml +++ b/tests/t00055/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00055_class: type: class diff --git a/tests/t00055/test_case.h b/tests/t00055/test_case.h index 44247877..391555a5 100644 --- a/tests/t00055/test_case.h +++ b/tests/t00055/test_case.h @@ -57,8 +57,7 @@ TEST_CASE("t00055", "[test-case][class]") REQUIRE_THAT(puml, IsLayoutHint(_A("F"), "down", _A("H"))); REQUIRE_THAT(puml, IsLayoutHint(_A("H"), "down", _A("J"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -77,6 +76,11 @@ TEST_CASE("t00055", "[test-case][class]") REQUIRE(IsClass(j, "I")); REQUIRE(IsClass(j, "J")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); + } + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); } } \ No newline at end of file diff --git a/tests/t00056/.clang-uml b/tests/t00056/.clang-uml index 64345fc7..58b5f2af 100644 --- a/tests/t00056/.clang-uml +++ b/tests/t00056/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00056_class: type: class diff --git a/tests/t00056/test_case.h b/tests/t00056/test_case.h index ae8a6a3b..2852bd3a 100644 --- a/tests/t00056/test_case.h +++ b/tests/t00056/test_case.h @@ -116,8 +116,7 @@ TEST_CASE("t00056", "[test-case][class]") IsConstraint( _A("F"), _A("greater_than_simple"), "T1,T3")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_class_json(diagram, *model); @@ -133,6 +132,11 @@ TEST_CASE("t00056", "[test-case][class]") REQUIRE(IsConcept(j, "iterable_with_value_type")); REQUIRE(IsConcept(j, "iterable_or_small_value_type")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); + } + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); } } \ No newline at end of file diff --git a/tests/t00057/.clang-uml b/tests/t00057/.clang-uml index 6ce6b2aa..1bd80828 100644 --- a/tests/t00057/.clang-uml +++ b/tests/t00057/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00057_class: type: class diff --git a/tests/t00057/test_case.h b/tests/t00057/test_case.h index 1d5eddc5..7783304f 100644 --- a/tests/t00057/test_case.h +++ b/tests/t00057/test_case.h @@ -59,8 +59,7 @@ TEST_CASE("t00057", "[test-case][class]") REQUIRE_THAT(puml, IsAggregation(_A("t00057_E"), _A("t00057_E::(height)"), "+height")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -77,6 +76,11 @@ TEST_CASE("t00057", "[test-case][class]") REQUIRE(get_element(j, "t00057_G").value()["type"] == "class"); REQUIRE(get_element(j, "t00057_R").value()["type"] == "class"); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); + } + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); } } \ No newline at end of file diff --git a/tests/t00058/.clang-uml b/tests/t00058/.clang-uml index dfc6afb4..2732bc62 100644 --- a/tests/t00058/.clang-uml +++ b/tests/t00058/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00058_class: type: class diff --git a/tests/t00058/test_case.h b/tests/t00058/test_case.h index 198f9aba..1ac074ab 100644 --- a/tests/t00058/test_case.h +++ b/tests/t00058/test_case.h @@ -66,8 +66,7 @@ TEST_CASE("t00058", "[test-case][class]") IsDependency(_A("same_as_first_type"), _A("first_type"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -79,6 +78,11 @@ TEST_CASE("t00058", "[test-case][class]") REQUIRE(IsClass( j, "B>")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); + } + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); } } \ No newline at end of file diff --git a/tests/t00059/.clang-uml b/tests/t00059/.clang-uml index 94adde8e..aea07570 100644 --- a/tests/t00059/.clang-uml +++ b/tests/t00059/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00059_class: type: class diff --git a/tests/t00059/test_case.h b/tests/t00059/test_case.h index 0ec40ec7..54211c31 100644 --- a/tests/t00059/test_case.h +++ b/tests/t00059/test_case.h @@ -86,8 +86,7 @@ TEST_CASE("t00059", "[test-case][class]") IsInstantiation(_A("fruit_factory"), _A("fruit_factory"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -99,6 +98,11 @@ TEST_CASE("t00059", "[test-case][class]") REQUIRE(IsConcept(j, "apple_c")); REQUIRE(IsConcept(j, "orange_c")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); + } + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); } } \ No newline at end of file diff --git a/tests/t00060/.clang-uml b/tests/t00060/.clang-uml index 8e127f89..a3e0feb5 100644 --- a/tests/t00060/.clang-uml +++ b/tests/t00060/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00060_class: type: class diff --git a/tests/t00060/test_case.h b/tests/t00060/test_case.h index c280890c..c38b6490 100644 --- a/tests/t00060/test_case.h +++ b/tests/t00060/test_case.h @@ -47,8 +47,7 @@ TEST_CASE("t00060", "[test-case][class]") REQUIRE_THAT(puml, IsClassTemplate("G", "T")); REQUIRE_THAT(puml, IsClassTemplate("H", "T,P")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -63,6 +62,11 @@ TEST_CASE("t00060", "[test-case][class]") REQUIRE(!IsClass(j, "E")); REQUIRE(!IsClass(j, "F")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); + } + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); } } \ No newline at end of file diff --git a/tests/t00061/.clang-uml b/tests/t00061/.clang-uml index c7c9ca95..7746905a 100644 --- a/tests/t00061/.clang-uml +++ b/tests/t00061/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00061_class: type: class diff --git a/tests/t00061/test_case.h b/tests/t00061/test_case.h index 38903fc8..57748bf9 100644 --- a/tests/t00061/test_case.h +++ b/tests/t00061/test_case.h @@ -40,8 +40,7 @@ TEST_CASE("t00061", "[test-case][class]") REQUIRE_THAT(puml, !IsClass(_A("B"))); REQUIRE_THAT(puml, !IsClass(_A("C"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -53,6 +52,11 @@ TEST_CASE("t00061", "[test-case][class]") REQUIRE(!IsClass(j, "B")); REQUIRE(!IsClass(j, "C")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); + } + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); } } \ No newline at end of file diff --git a/tests/t00062/.clang-uml b/tests/t00062/.clang-uml index 50736f34..23540c84 100644 --- a/tests/t00062/.clang-uml +++ b/tests/t00062/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00062_class: type: class diff --git a/tests/t00062/test_case.h b/tests/t00062/test_case.h index 054419d5..31ab4eff 100644 --- a/tests/t00062/test_case.h +++ b/tests/t00062/test_case.h @@ -83,8 +83,7 @@ TEST_CASE("t00062", "[test-case][class]") REQUIRE_THAT(puml, IsInstantiation(_A("A"), _A("A>"))); REQUIRE_THAT(puml, IsInstantiation(_A("A"), _A("A>"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -92,6 +91,11 @@ TEST_CASE("t00062", "[test-case][class]") using namespace json; - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); + } + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); } } \ No newline at end of file diff --git a/tests/t00063/.clang-uml b/tests/t00063/.clang-uml index e3704069..46e5bb1a 100644 --- a/tests/t00063/.clang-uml +++ b/tests/t00063/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00063_class: type: class diff --git a/tests/t00063/test_case.h b/tests/t00063/test_case.h index 258f89b9..965874c7 100644 --- a/tests/t00063/test_case.h +++ b/tests/t00063/test_case.h @@ -39,8 +39,7 @@ TEST_CASE("t00063", "[test-case][class]") REQUIRE_THAT(puml, !IsEnum(_A("B"))); REQUIRE_THAT(puml, !IsEnum(_A("C"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -52,6 +51,11 @@ TEST_CASE("t00063", "[test-case][class]") REQUIRE(!IsEnum(j, "B")); REQUIRE(!IsEnum(j, "C")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); + } + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); } } \ No newline at end of file diff --git a/tests/t00064/.clang-uml b/tests/t00064/.clang-uml index 7a15ca17..313c0bac 100644 --- a/tests/t00064/.clang-uml +++ b/tests/t00064/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00064_class: type: class diff --git a/tests/t00064/test_case.h b/tests/t00064/test_case.h index d10e290e..22d39c17 100644 --- a/tests/t00064/test_case.h +++ b/tests/t00064/test_case.h @@ -78,8 +78,7 @@ TEST_CASE("t00064", "[test-case][class]") "find", "unsigned int", "const value_type & v"))); #endif - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -87,6 +86,11 @@ TEST_CASE("t00064", "[test-case][class]") using namespace json; - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); + } + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); } } \ No newline at end of file diff --git a/tests/t00065/.clang-uml b/tests/t00065/.clang-uml index 4c7143fb..f77d743c 100644 --- a/tests/t00065/.clang-uml +++ b/tests/t00065/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00065_class: type: class diff --git a/tests/t00065/test_case.h b/tests/t00065/test_case.h index d8004889..75dc215a 100644 --- a/tests/t00065/test_case.h +++ b/tests/t00065/test_case.h @@ -47,8 +47,7 @@ TEST_CASE("t00065", "[test-case][class]") REQUIRE_THAT(puml, IsPackage("submodule1a")); REQUIRE_THAT(puml, IsPackage("concepts")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -56,6 +55,11 @@ TEST_CASE("t00065", "[test-case][class]") using namespace json; - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); + } + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); } } \ No newline at end of file diff --git a/tests/t00066/.clang-uml b/tests/t00066/.clang-uml index f2066018..abab698f 100644 --- a/tests/t00066/.clang-uml +++ b/tests/t00066/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00066_class: type: class diff --git a/tests/t00066/test_case.h b/tests/t00066/test_case.h index 3619b55c..4336d03b 100644 --- a/tests/t00066/test_case.h +++ b/tests/t00066/test_case.h @@ -69,8 +69,7 @@ TEST_CASE("t00066", "[test-case][class]") REQUIRE_THAT(puml, (IsField("b_", "int"))); REQUIRE_THAT(puml, (IsField("c_", "int"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -78,6 +77,11 @@ TEST_CASE("t00066", "[test-case][class]") using namespace json; - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); + } + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); } } \ No newline at end of file diff --git a/tests/t00067/.clang-uml b/tests/t00067/.clang-uml index d2b5cc5b..b2a26a0e 100644 --- a/tests/t00067/.clang-uml +++ b/tests/t00067/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t00067_class: type: class diff --git a/tests/t00067/test_case.h b/tests/t00067/test_case.h index e9fb3cc5..03d3dc0a 100644 --- a/tests/t00067/test_case.h +++ b/tests/t00067/test_case.h @@ -44,8 +44,7 @@ TEST_CASE("t00067", "[test-case][class]") REQUIRE_THAT(puml, !(IsMethod("~A"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -53,6 +52,11 @@ TEST_CASE("t00067", "[test-case][class]") using namespace json; - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); + } + { + auto mmd = generate_class_mermaid(diagram, *model); + + save_mermaid(config.output_directory(), diagram->name + ".mmd", mmd); } } \ No newline at end of file diff --git a/tests/t20001/.clang-uml b/tests/t20001/.clang-uml index 8cf49fdc..8ed2b5b8 100644 --- a/tests/t20001/.clang-uml +++ b/tests/t20001/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20001_sequence: type: sequence diff --git a/tests/t20001/test_case.h b/tests/t20001/test_case.h index 8713f443..2b02bab1 100644 --- a/tests/t20001/test_case.h +++ b/tests/t20001/test_case.h @@ -43,8 +43,7 @@ TEST_CASE("t20001", "[test-case][sequence]") REQUIRE_THAT(puml, HasComment("t20001 test diagram of type sequence")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { auto j = generate_sequence_json(diagram, *model); @@ -65,6 +64,6 @@ TEST_CASE("t20001", "[test-case][sequence]") REQUIRE(std::is_sorted(messages.begin(), messages.end())); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } diff --git a/tests/t20002/.clang-uml b/tests/t20002/.clang-uml index 8dfb0825..437d25a6 100644 --- a/tests/t20002/.clang-uml +++ b/tests/t20002/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20002_sequence: type: sequence diff --git a/tests/t20002/test_case.h b/tests/t20002/test_case.h index 092e514e..8b281240 100644 --- a/tests/t20002/test_case.h +++ b/tests/t20002/test_case.h @@ -39,8 +39,7 @@ TEST_CASE("t20002", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("m2()"), _A("m3()"), "")); REQUIRE_THAT(puml, HasCall(_A("m3()"), _A("m4()"), "")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -59,6 +58,6 @@ TEST_CASE("t20002", "[test-case][sequence]") REQUIRE(std::is_sorted(messages.begin(), messages.end())); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } diff --git a/tests/t20003/.clang-uml b/tests/t20003/.clang-uml index aee8374b..40cb7eee 100644 --- a/tests/t20003/.clang-uml +++ b/tests/t20003/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20003_sequence: type: sequence diff --git a/tests/t20003/test_case.h b/tests/t20003/test_case.h index 669a388e..d5bbbbc4 100644 --- a/tests/t20003/test_case.h +++ b/tests/t20003/test_case.h @@ -39,8 +39,7 @@ TEST_CASE("t20003", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("m2(T)"), _A("m3(T)"), "")); REQUIRE_THAT(puml, HasCall(_A("m3(T)"), _A("m4(T)"), "")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -54,6 +53,6 @@ TEST_CASE("t20003", "[test-case][sequence]") REQUIRE(std::is_sorted(messages.begin(), messages.end())); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } diff --git a/tests/t20004/.clang-uml b/tests/t20004/.clang-uml index 0e1618e9..00ef7901 100644 --- a/tests/t20004/.clang-uml +++ b/tests/t20004/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20004_sequence: type: sequence diff --git a/tests/t20004/test_case.h b/tests/t20004/test_case.h index 8de05566..82f483c5 100644 --- a/tests/t20004/test_case.h +++ b/tests/t20004/test_case.h @@ -57,8 +57,7 @@ TEST_CASE("t20004", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("m3(int)"), _A("m4(int)"), "")); REQUIRE_THAT(puml, EndsWith("@enduml\n")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -81,6 +80,6 @@ TEST_CASE("t20004", "[test-case][sequence]") REQUIRE(std::is_sorted(messages.begin(), messages.end())); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t20005/.clang-uml b/tests/t20005/.clang-uml index 5b298510..7c497c16 100644 --- a/tests/t20005/.clang-uml +++ b/tests/t20005/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20005_sequence: type: sequence diff --git a/tests/t20005/test_case.h b/tests/t20005/test_case.h index 79172e7c..e9436077 100644 --- a/tests/t20005/test_case.h +++ b/tests/t20005/test_case.h @@ -41,8 +41,7 @@ TEST_CASE("t20005", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("B"), _A("A"), "a(T)")); REQUIRE_THAT(puml, HasExitpoint(_A("C"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -55,6 +54,6 @@ TEST_CASE("t20005", "[test-case][sequence]") REQUIRE(std::is_sorted(messages.begin(), messages.end())); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t20006/.clang-uml b/tests/t20006/.clang-uml index 47360f32..a99a842e 100644 --- a/tests/t20006/.clang-uml +++ b/tests/t20006/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20006_sequence: type: sequence diff --git a/tests/t20006/test_case.h b/tests/t20006/test_case.h index 6d1cb553..625341ae 100644 --- a/tests/t20006/test_case.h +++ b/tests/t20006/test_case.h @@ -75,8 +75,7 @@ TEST_CASE("t20006", "[test-case][sequence]") REQUIRE_THAT( puml, HasCall(_A("BB"), _A("AA"), "aa2(int)")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -95,6 +94,6 @@ TEST_CASE("t20006", "[test-case][sequence]") REQUIRE(std::is_sorted(messages.begin(), messages.end())); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t20007/.clang-uml b/tests/t20007/.clang-uml index e0324ed3..953db3ed 100644 --- a/tests/t20007/.clang-uml +++ b/tests/t20007/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20007_sequence: type: sequence diff --git a/tests/t20007/test_case.h b/tests/t20007/test_case.h index 39585d6d..c995b9f5 100644 --- a/tests/t20007/test_case.h +++ b/tests/t20007/test_case.h @@ -46,8 +46,7 @@ TEST_CASE("t20007", "[test-case][sequence]") _A("Adder"), "add(std::string &&,std::string &&,std::string &&)")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -65,6 +64,6 @@ TEST_CASE("t20007", "[test-case][sequence]") REQUIRE(std::is_sorted(messages.begin(), messages.end())); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t20008/.clang-uml b/tests/t20008/.clang-uml index 5aa1c79d..adecc8e0 100644 --- a/tests/t20008/.clang-uml +++ b/tests/t20008/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20008_sequence: type: sequence diff --git a/tests/t20008/test_case.h b/tests/t20008/test_case.h index 05fff42f..57779662 100644 --- a/tests/t20008/test_case.h +++ b/tests/t20008/test_case.h @@ -54,8 +54,7 @@ TEST_CASE("t20008", "[test-case][sequence]") HasCall( _A("B"), _A("A"), "a3(std::string)")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -75,6 +74,6 @@ TEST_CASE("t20008", "[test-case][sequence]") REQUIRE(std::is_sorted(messages.begin(), messages.end())); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t20009/.clang-uml b/tests/t20009/.clang-uml index 3bc94e92..a316f367 100644 --- a/tests/t20009/.clang-uml +++ b/tests/t20009/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20009_sequence: type: sequence diff --git a/tests/t20009/test_case.h b/tests/t20009/test_case.h index 1994e2c5..e36f41fe 100644 --- a/tests/t20009/test_case.h +++ b/tests/t20009/test_case.h @@ -47,8 +47,7 @@ TEST_CASE("t20009", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("tmain()"), _A("B"), "b(float)")); REQUIRE_THAT(puml, HasCall(_A("B"), _A("A"), "a(float)")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -67,6 +66,6 @@ TEST_CASE("t20009", "[test-case][sequence]") REQUIRE(std::is_sorted(messages.begin(), messages.end())); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t20010/.clang-uml b/tests/t20010/.clang-uml index 0af678b5..1b708ad2 100644 --- a/tests/t20010/.clang-uml +++ b/tests/t20010/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20010_sequence: type: sequence diff --git a/tests/t20010/test_case.h b/tests/t20010/test_case.h index 9e3082c7..5a5cc9f0 100644 --- a/tests/t20010/test_case.h +++ b/tests/t20010/test_case.h @@ -48,8 +48,7 @@ TEST_CASE("t20010", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("tmain()"), _A("B"), "b4()")); REQUIRE_THAT(puml, HasCall(_A("B"), _A("A"), "a4()")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -69,6 +68,6 @@ TEST_CASE("t20010", "[test-case][sequence]") REQUIRE(std::is_sorted(messages.begin(), messages.end())); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t20011/.clang-uml b/tests/t20011/.clang-uml index 8b1586e5..9c59bd5b 100644 --- a/tests/t20011/.clang-uml +++ b/tests/t20011/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20011_sequence: type: sequence diff --git a/tests/t20011/test_case.h b/tests/t20011/test_case.h index 917fd6f1..8d44803c 100644 --- a/tests/t20011/test_case.h +++ b/tests/t20011/test_case.h @@ -43,8 +43,7 @@ TEST_CASE("t20011", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("A"), _A("A"), "d(int)")); REQUIRE_THAT(puml, HasCall(_A("A"), _A("A"), "b(int)")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -62,6 +61,6 @@ TEST_CASE("t20011", "[test-case][sequence]") REQUIRE(std::is_sorted(messages.begin(), messages.end())); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t20012/.clang-uml b/tests/t20012/.clang-uml index a4d1882c..318c2e6b 100644 --- a/tests/t20012/.clang-uml +++ b/tests/t20012/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20012_sequence: type: sequence diff --git a/tests/t20012/test_case.h b/tests/t20012/test_case.h index e71c2385..fe1b70c6 100644 --- a/tests/t20012/test_case.h +++ b/tests/t20012/test_case.h @@ -77,8 +77,7 @@ TEST_CASE("t20012", "[test-case][sequence]") // @todo #168 // REQUIRE_THAT(puml, HasCall(_A("tmain()"), _A("D"), "add5(int)")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -120,6 +119,6 @@ TEST_CASE("t20012", "[test-case][sequence]") REQUIRE(std::is_sorted(messages.begin(), messages.end())); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } diff --git a/tests/t20013/.clang-uml b/tests/t20013/.clang-uml index 650e6e87..a8620c1a 100644 --- a/tests/t20013/.clang-uml +++ b/tests/t20013/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20013_sequence: type: sequence diff --git a/tests/t20013/test_case.h b/tests/t20013/test_case.h index dc005e7a..e3b826a7 100644 --- a/tests/t20013/test_case.h +++ b/tests/t20013/test_case.h @@ -47,8 +47,7 @@ TEST_CASE("t20013", "[test-case][sequence]") HasCall(_A("tmain(int,char **)"), _A("B"), "b(const char *)")); REQUIRE_THAT(puml, HasCall(_A("B"), _A("A"), "a3(const char *)")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -66,6 +65,6 @@ TEST_CASE("t20013", "[test-case][sequence]") REQUIRE(std::is_sorted(messages.begin(), messages.end())); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t20014/.clang-uml b/tests/t20014/.clang-uml index 464dba5d..26cb0913 100644 --- a/tests/t20014/.clang-uml +++ b/tests/t20014/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20014_sequence: type: sequence diff --git a/tests/t20014/test_case.h b/tests/t20014/test_case.h index 91f6d7de..00d194a4 100644 --- a/tests/t20014/test_case.h +++ b/tests/t20014/test_case.h @@ -45,8 +45,7 @@ TEST_CASE("t20014", "[test-case][sequence]") puml, HasCall(_A("tmain()"), _A("C"), "c1(int,int)")); REQUIRE_THAT(puml, HasCall(_A("C"), _A("B"), "b1(int,int)")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -65,6 +64,6 @@ TEST_CASE("t20014", "[test-case][sequence]") REQUIRE(std::is_sorted(messages.begin(), messages.end())); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t20015/.clang-uml b/tests/t20015/.clang-uml index d858dba3..4f550ad4 100644 --- a/tests/t20015/.clang-uml +++ b/tests/t20015/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20015_sequence: type: sequence diff --git a/tests/t20015/test_case.h b/tests/t20015/test_case.h index 29116c7a..0a05b4a6 100644 --- a/tests/t20015/test_case.h +++ b/tests/t20015/test_case.h @@ -46,8 +46,7 @@ TEST_CASE("t20015", "[test-case][sequence]") REQUIRE_THAT(puml, !HasCall(_A("B"), _A("B"), "set_y(int)")); REQUIRE_THAT(puml, !HasCall(_A("B"), _A("B"), "set_z(int)")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -60,6 +59,6 @@ TEST_CASE("t20015", "[test-case][sequence]") REQUIRE(std::is_sorted(messages.begin(), messages.end())); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t20016/.clang-uml b/tests/t20016/.clang-uml index ef2b94d6..d1bb343b 100644 --- a/tests/t20016/.clang-uml +++ b/tests/t20016/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20016_sequence: type: sequence diff --git a/tests/t20016/test_case.h b/tests/t20016/test_case.h index 4bc099f3..15e35993 100644 --- a/tests/t20016/test_case.h +++ b/tests/t20016/test_case.h @@ -41,8 +41,7 @@ TEST_CASE("t20016", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("tmain()"), _A("B"), "b2(long)")); REQUIRE_THAT(puml, HasCall(_A("B"), _A("A"), "a2(const long &)")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -58,6 +57,6 @@ TEST_CASE("t20016", "[test-case][sequence]") REQUIRE(std::is_sorted(messages.begin(), messages.end())); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t20017/.clang-uml b/tests/t20017/.clang-uml index 23fc3539..30a4154d 100644 --- a/tests/t20017/.clang-uml +++ b/tests/t20017/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20017_sequence: type: sequence diff --git a/tests/t20017/test_case.h b/tests/t20017/test_case.h index fe94fd45..8f5e26fb 100644 --- a/tests/t20017/test_case.h +++ b/tests/t20017/test_case.h @@ -49,8 +49,7 @@ TEST_CASE("t20017", "[test-case][sequence]") _A("t20017.cc"), _A("include/t20017_b.h"), "b2(int,int)")); REQUIRE_THAT(puml, HasExitpoint(_A("t20017.cc"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -72,6 +71,6 @@ TEST_CASE("t20017", "[test-case][sequence]") REQUIRE(std::is_sorted(messages.begin(), messages.end())); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t20018/.clang-uml b/tests/t20018/.clang-uml index 0babfeb5..6168917d 100644 --- a/tests/t20018/.clang-uml +++ b/tests/t20018/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20018_sequence: type: sequence diff --git a/tests/t20018/test_case.h b/tests/t20018/test_case.h index fb11d96d..1eea53f7 100644 --- a/tests/t20018/test_case.h +++ b/tests/t20018/test_case.h @@ -53,8 +53,7 @@ TEST_CASE("t20018", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("Factorial<1>"), _A("Factorial<0>"), "__print(int)__")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -75,6 +74,6 @@ TEST_CASE("t20018", "[test-case][sequence]") REQUIRE(std::is_sorted(messages.begin(), messages.end())); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t20019/.clang-uml b/tests/t20019/.clang-uml index 3804e9cc..de0bffa3 100644 --- a/tests/t20019/.clang-uml +++ b/tests/t20019/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20019_sequence: type: sequence diff --git a/tests/t20019/test_case.h b/tests/t20019/test_case.h index e9394fc0..903efeda 100644 --- a/tests/t20019/test_case.h +++ b/tests/t20019/test_case.h @@ -41,8 +41,7 @@ TEST_CASE("t20019", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("tmain()"), _A("Base"), "name()")); REQUIRE_THAT(puml, HasCall(_A("Base"), _A("D2"), "impl()")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -58,6 +57,6 @@ TEST_CASE("t20019", "[test-case][sequence]") REQUIRE(std::is_sorted(messages.begin(), messages.end())); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t20020/.clang-uml b/tests/t20020/.clang-uml index a7679e65..891d3df2 100644 --- a/tests/t20020/.clang-uml +++ b/tests/t20020/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20020_sequence: type: sequence diff --git a/tests/t20020/test_case.h b/tests/t20020/test_case.h index 1dcfe826..5314b9ef 100644 --- a/tests/t20020/test_case.h +++ b/tests/t20020/test_case.h @@ -53,8 +53,7 @@ TEST_CASE("t20020", "[test-case][sequence]") REQUIRE_THAT( puml, HasCallInControlCondition(_A("tmain()"), _A("C"), "c3(int)")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -78,6 +77,6 @@ TEST_CASE("t20020", "[test-case][sequence]") REQUIRE(std::is_sorted(messages.begin(), messages.end())); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t20021/.clang-uml b/tests/t20021/.clang-uml index 938b7a7e..8fdf0132 100644 --- a/tests/t20021/.clang-uml +++ b/tests/t20021/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20021_sequence: type: sequence diff --git a/tests/t20021/test_case.h b/tests/t20021/test_case.h index 130bd08a..f2a98000 100644 --- a/tests/t20021/test_case.h +++ b/tests/t20021/test_case.h @@ -58,8 +58,7 @@ TEST_CASE("t20021", "[test-case][sequence]") REQUIRE_THAT(puml, HasCallInControlCondition(_A("tmain()"), _A("C"), "contents()")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -84,6 +83,6 @@ TEST_CASE("t20021", "[test-case][sequence]") REQUIRE(std::is_sorted(messages.begin(), messages.end())); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t20022/.clang-uml b/tests/t20022/.clang-uml index 08f05219..6fe768b8 100644 --- a/tests/t20022/.clang-uml +++ b/tests/t20022/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20022_sequence: type: sequence diff --git a/tests/t20022/test_case.h b/tests/t20022/test_case.h index 2c462ae2..026930a4 100644 --- a/tests/t20022/test_case.h +++ b/tests/t20022/test_case.h @@ -38,8 +38,7 @@ TEST_CASE("t20022", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("tmain()"), _A("A"), "a()")); REQUIRE_THAT(puml, HasCall(_A("A"), _A("B"), "b()")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -52,6 +51,6 @@ TEST_CASE("t20022", "[test-case][sequence]") REQUIRE(std::is_sorted(messages.begin(), messages.end())); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t20023/.clang-uml b/tests/t20023/.clang-uml index 086afe9d..49f82a99 100644 --- a/tests/t20023/.clang-uml +++ b/tests/t20023/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20023_sequence: type: sequence diff --git a/tests/t20023/test_case.h b/tests/t20023/test_case.h index d1b23027..4f17bd6b 100644 --- a/tests/t20023/test_case.h +++ b/tests/t20023/test_case.h @@ -41,8 +41,7 @@ TEST_CASE("t20023", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("A"), _A("A"), "a3()")); REQUIRE_THAT(puml, HasCall(_A("A"), _A("A"), "a4()")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -56,6 +55,6 @@ TEST_CASE("t20023", "[test-case][sequence]") REQUIRE(std::is_sorted(messages.begin(), messages.end())); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t20024/.clang-uml b/tests/t20024/.clang-uml index 1420bf1f..52b29956 100644 --- a/tests/t20024/.clang-uml +++ b/tests/t20024/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20024_sequence: type: sequence diff --git a/tests/t20024/test_case.h b/tests/t20024/test_case.h index 84551392..57d13c91 100644 --- a/tests/t20024/test_case.h +++ b/tests/t20024/test_case.h @@ -46,8 +46,7 @@ TEST_CASE("t20024", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("B"), _A("B"), "orange()")); REQUIRE_THAT(puml, HasCall(_A("B"), _A("B"), "green()")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -62,6 +61,6 @@ TEST_CASE("t20024", "[test-case][sequence]") REQUIRE(std::is_sorted(messages.begin(), messages.end())); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t20025/.clang-uml b/tests/t20025/.clang-uml index 14e8ed22..0e72c357 100644 --- a/tests/t20025/.clang-uml +++ b/tests/t20025/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20025_sequence: type: sequence diff --git a/tests/t20025/test_case.h b/tests/t20025/test_case.h index a309e768..b468ad25 100644 --- a/tests/t20025/test_case.h +++ b/tests/t20025/test_case.h @@ -41,8 +41,7 @@ TEST_CASE("t20025", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("tmain()"), _A("add(int,int)"), "")); REQUIRE_THAT(puml, !HasCall(_A("tmain()"), _A("add2(int,int)"), "")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -56,6 +55,6 @@ TEST_CASE("t20025", "[test-case][sequence]") REQUIRE(std::is_sorted(messages.begin(), messages.end())); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t20026/.clang-uml b/tests/t20026/.clang-uml index fc5e972e..0ade1944 100644 --- a/tests/t20026/.clang-uml +++ b/tests/t20026/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20026_sequence: type: sequence diff --git a/tests/t20026/test_case.h b/tests/t20026/test_case.h index 93949707..cdd56156 100644 --- a/tests/t20026/test_case.h +++ b/tests/t20026/test_case.h @@ -37,8 +37,7 @@ TEST_CASE("t20026", "[test-case][sequence]") // Check if all calls exist REQUIRE_THAT(puml, HasCall(_A("tmain()"), _A("A"), "a()")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -50,6 +49,6 @@ TEST_CASE("t20026", "[test-case][sequence]") REQUIRE(std::is_sorted(messages.begin(), messages.end())); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t20027/.clang-uml b/tests/t20027/.clang-uml index 10737381..32752095 100644 --- a/tests/t20027/.clang-uml +++ b/tests/t20027/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20027_sequence: type: sequence diff --git a/tests/t20027/test_case.h b/tests/t20027/test_case.h index fca26ac9..4562a71d 100644 --- a/tests/t20027/test_case.h +++ b/tests/t20027/test_case.h @@ -39,8 +39,7 @@ TEST_CASE("t20027", "[test-case][sequence]") REQUIRE_THAT(puml, !HasCall(_A("A"), _A("A"), "aa()")); REQUIRE_THAT(puml, !HasCall(_A("A"), _A("A"), "aaa()")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -52,6 +51,6 @@ TEST_CASE("t20027", "[test-case][sequence]") REQUIRE(std::is_sorted(messages.begin(), messages.end())); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t20028/.clang-uml b/tests/t20028/.clang-uml index 24d8ee97..cf295f8b 100644 --- a/tests/t20028/.clang-uml +++ b/tests/t20028/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20028_sequence: type: sequence diff --git a/tests/t20028/test_case.h b/tests/t20028/test_case.h index 89e49668..b596fa7d 100644 --- a/tests/t20028/test_case.h +++ b/tests/t20028/test_case.h @@ -42,8 +42,7 @@ TEST_CASE("t20028", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("tmain()"), _A("A"), "d()")); REQUIRE_THAT(puml, !HasCall(_A("tmain()"), _A("B"), "e()")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -58,6 +57,6 @@ TEST_CASE("t20028", "[test-case][sequence]") REQUIRE(std::is_sorted(messages.begin(), messages.end())); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t20029/.clang-uml b/tests/t20029/.clang-uml index ca543ed2..cc1ccd3a 100644 --- a/tests/t20029/.clang-uml +++ b/tests/t20029/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20029_sequence: type: sequence diff --git a/tests/t20029/test_case.h b/tests/t20029/test_case.h index 7a0c6ac7..6438d32f 100644 --- a/tests/t20029/test_case.h +++ b/tests/t20029/test_case.h @@ -59,8 +59,7 @@ TEST_CASE("t20029", "[test-case][sequence]") !HasCall( _A("ConnectionPool"), _A("ConnectionPool"), "connect_impl()")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -82,6 +81,6 @@ TEST_CASE("t20029", "[test-case][sequence]") REQUIRE(std::is_sorted(messages.begin(), messages.end())); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t20030/.clang-uml b/tests/t20030/.clang-uml index a4d9f94a..a54e474d 100644 --- a/tests/t20030/.clang-uml +++ b/tests/t20030/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20030_sequence: type: sequence diff --git a/tests/t20030/test_case.h b/tests/t20030/test_case.h index 6e7da9f1..aced9127 100644 --- a/tests/t20030/test_case.h +++ b/tests/t20030/test_case.h @@ -52,8 +52,7 @@ TEST_CASE("t20030", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("A"), _A("A"), "set(int)")); REQUIRE_THAT(puml, HasCall(_A("tmain(bool,int)"), _A("A"), "value()")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -61,6 +60,6 @@ TEST_CASE("t20030", "[test-case][sequence]") using namespace json; - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t20031/.clang-uml b/tests/t20031/.clang-uml index da8b7038..3907966f 100644 --- a/tests/t20031/.clang-uml +++ b/tests/t20031/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20031_sequence: type: sequence diff --git a/tests/t20031/test_case.h b/tests/t20031/test_case.h index 25e82b48..707a9146 100644 --- a/tests/t20031/test_case.h +++ b/tests/t20031/test_case.h @@ -55,8 +55,7 @@ TEST_CASE("t20031", "[test-case][sequence]") "../../tests/t20031/t20031.cc:47:26)"), _A("zero()"), "")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -64,6 +63,6 @@ TEST_CASE("t20031", "[test-case][sequence]") using namespace json; - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t20032/.clang-uml b/tests/t20032/.clang-uml index 5c88e05a..104141ab 100644 --- a/tests/t20032/.clang-uml +++ b/tests/t20032/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20032_sequence: type: sequence diff --git a/tests/t20032/test_case.h b/tests/t20032/test_case.h index d693533a..9f5d4242 100644 --- a/tests/t20032/test_case.h +++ b/tests/t20032/test_case.h @@ -55,8 +55,7 @@ TEST_CASE("t20032", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("B"), _A("A"), "a3(const char *)")); REQUIRE_THAT(puml, HasResponse(_A("B"), _A("A"), "const char *")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -74,6 +73,6 @@ TEST_CASE("t20032", "[test-case][sequence]") REQUIRE(std::is_sorted(messages.begin(), messages.end())); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t20033/.clang-uml b/tests/t20033/.clang-uml index f081bdbc..0f230c2b 100644 --- a/tests/t20033/.clang-uml +++ b/tests/t20033/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20033_sequence: type: sequence diff --git a/tests/t20033/test_case.h b/tests/t20033/test_case.h index 36929b23..22eaff7b 100644 --- a/tests/t20033/test_case.h +++ b/tests/t20033/test_case.h @@ -44,8 +44,7 @@ TEST_CASE("t20033", "[test-case][sequence]") REQUIRE_THAT( puml, HasCallInControlCondition(_A("tmain()"), _A("A"), "a4()")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -53,6 +52,6 @@ TEST_CASE("t20033", "[test-case][sequence]") using namespace json; - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t20034/.clang-uml b/tests/t20034/.clang-uml index 83d964c9..3e970e05 100644 --- a/tests/t20034/.clang-uml +++ b/tests/t20034/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20034_sequence: type: sequence diff --git a/tests/t20034/test_case.h b/tests/t20034/test_case.h index 1363fca0..d184d1ac 100644 --- a/tests/t20034/test_case.h +++ b/tests/t20034/test_case.h @@ -47,8 +47,7 @@ TEST_CASE("t20034", "[test-case][sequence]") REQUIRE_THAT(puml, !HasCall(_A("C"), _A("B"), "b3()")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -72,6 +71,6 @@ TEST_CASE("t20034", "[test-case][sequence]") {{"D::d2()", "C::c2()", "void"}, {"C::c2()", "B::b2()", "void"}, {"B::b2()", "A::a2()", "void"}})); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t20035/.clang-uml b/tests/t20035/.clang-uml index 7b1a708e..c7ee1c78 100644 --- a/tests/t20035/.clang-uml +++ b/tests/t20035/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20035_sequence: type: sequence diff --git a/tests/t20035/test_case.h b/tests/t20035/test_case.h index 50134794..67b3614f 100644 --- a/tests/t20035/test_case.h +++ b/tests/t20035/test_case.h @@ -39,8 +39,7 @@ TEST_CASE("t20035", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("a(int)"), _A("b1(int)"), "")); REQUIRE_THAT(puml, HasCall(_A("b1(int)"), _A("c(int)"), "")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -52,6 +51,6 @@ TEST_CASE("t20035", "[test-case][sequence]") {{"tmain(int,char **)", "a(int)", "int"}, {"a(int)", "b1(int)", "int"}, {"b1(int)", "c(int)", "int"}})); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t20036/.clang-uml b/tests/t20036/.clang-uml index f6bc00ff..9339d814 100644 --- a/tests/t20036/.clang-uml +++ b/tests/t20036/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t20036_sequence: type: sequence diff --git a/tests/t20036/test_case.h b/tests/t20036/test_case.h index 67381a9f..5f9ca877 100644 --- a/tests/t20036/test_case.h +++ b/tests/t20036/test_case.h @@ -47,8 +47,7 @@ TEST_CASE("t20036", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("C"), _A("B"), "b1()")); REQUIRE_THAT(puml, HasCall(_A("B"), _A("A"), "a2()")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -68,6 +67,6 @@ TEST_CASE("t20036", "[test-case][sequence]") REQUIRE(HasMessageChain(j, {{"C::c1()", "B::b1()", "void"}, {"B::b1()", "A::a2()", "void"}})); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t30001/.clang-uml b/tests/t30001/.clang-uml index 0825068b..e5faba78 100644 --- a/tests/t30001/.clang-uml +++ b/tests/t30001/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t30001_package: type: package diff --git a/tests/t30001/test_case.h b/tests/t30001/test_case.h index 1442e8d9..c6beef2e 100644 --- a/tests/t30001/test_case.h +++ b/tests/t30001/test_case.h @@ -61,8 +61,7 @@ TEST_CASE("t30001", "[test-case][package]") REQUIRE_THAT(puml, HasComment("t30001 test diagram of type package")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -81,6 +80,6 @@ TEST_CASE("t30001", "[test-case][package]") REQUIRE(IsPackage(j, "B::AA::BBB")); REQUIRE(IsPackage(j, "B::BB")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } diff --git a/tests/t30002/.clang-uml b/tests/t30002/.clang-uml index dbbd0717..c2111c65 100644 --- a/tests/t30002/.clang-uml +++ b/tests/t30002/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t30002_package: type: package diff --git a/tests/t30002/test_case.h b/tests/t30002/test_case.h index b589496b..90b630b5 100644 --- a/tests/t30002/test_case.h +++ b/tests/t30002/test_case.h @@ -72,8 +72,7 @@ TEST_CASE("t30002", "[test-case][package]") REQUIRE_THAT(puml, IsDependency(_A("BBB"), _A("A17"))); REQUIRE_THAT(puml, IsDependency(_A("BBB"), _A("A18"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -120,6 +119,6 @@ TEST_CASE("t30002", "[test-case][package]") REQUIRE(IsDependency(j, "B::BB::BBB", "A::AA::A16")); REQUIRE(IsDependency(j, "B::BB::BBB", "A::AA::A17")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } diff --git a/tests/t30003/.clang-uml b/tests/t30003/.clang-uml index 74318921..b4322243 100644 --- a/tests/t30003/.clang-uml +++ b/tests/t30003/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t30003_package: type: package diff --git a/tests/t30003/test_case.h b/tests/t30003/test_case.h index c9b9e200..a7ae58c7 100644 --- a/tests/t30003/test_case.h +++ b/tests/t30003/test_case.h @@ -43,8 +43,7 @@ TEST_CASE("t30003", "[test-case][package]") REQUIRE_THAT(puml, IsDeprecated(_A("ns2_v0_9_0"))); REQUIRE_THAT(puml, IsDeprecated(_A("ns3"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -62,6 +61,6 @@ TEST_CASE("t30003", "[test-case][package]") REQUIRE(IsDeprecated(j, "ns1::ns2_v0_9_0")); REQUIRE(IsDeprecated(j, "ns3")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } diff --git a/tests/t30004/.clang-uml b/tests/t30004/.clang-uml index ac7fcc9a..c273c5f6 100644 --- a/tests/t30004/.clang-uml +++ b/tests/t30004/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t30004_package: type: package diff --git a/tests/t30004/test_case.h b/tests/t30004/test_case.h index ef97bd49..d4a2e2c8 100644 --- a/tests/t30004/test_case.h +++ b/tests/t30004/test_case.h @@ -41,8 +41,7 @@ TEST_CASE("t30004", "[test-case][package]") REQUIRE_THAT(puml, !IsPackage("DDD")); REQUIRE_THAT(puml, IsPackage("EEE")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -57,6 +56,6 @@ TEST_CASE("t30004", "[test-case][package]") REQUIRE(!IsPackage(j, "A::DDD")); REQUIRE(IsPackage(j, "A::EEE")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } diff --git a/tests/t30005/.clang-uml b/tests/t30005/.clang-uml index 1512c67f..bbfe0e64 100644 --- a/tests/t30005/.clang-uml +++ b/tests/t30005/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t30005_package: type: package diff --git a/tests/t30005/test_case.h b/tests/t30005/test_case.h index 18665830..ac1ac61c 100644 --- a/tests/t30005/test_case.h +++ b/tests/t30005/test_case.h @@ -42,8 +42,7 @@ TEST_CASE("t30005", "[test-case][package]") REQUIRE_THAT(puml, IsDependency(_A("BBB"), _A("AAA"))); REQUIRE_THAT(puml, IsDependency(_A("CCC"), _A("AAA"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -64,6 +63,6 @@ TEST_CASE("t30005", "[test-case][package]") REQUIRE(IsDependency(j, "B::BB::BBB", "A::AA::AAA")); REQUIRE(IsDependency(j, "C::CC::CCC", "A::AA::AAA")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } diff --git a/tests/t30006/.clang-uml b/tests/t30006/.clang-uml index 7899d3cc..5f970f91 100644 --- a/tests/t30006/.clang-uml +++ b/tests/t30006/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t30006_package: type: package diff --git a/tests/t30006/test_case.h b/tests/t30006/test_case.h index b238f55e..5a11b407 100644 --- a/tests/t30006/test_case.h +++ b/tests/t30006/test_case.h @@ -42,8 +42,7 @@ TEST_CASE("t30006", "[test-case][package]") REQUIRE_THAT(puml, IsDependency(_A("A"), _A("B"))); REQUIRE_THAT(puml, IsDependency(_A("A"), _A("C"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -58,6 +57,6 @@ TEST_CASE("t30006", "[test-case][package]") REQUIRE(IsDependency(j, "A", "B")); REQUIRE(IsDependency(j, "A", "C")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } diff --git a/tests/t30007/.clang-uml b/tests/t30007/.clang-uml index 96c875a0..4551c4da 100644 --- a/tests/t30007/.clang-uml +++ b/tests/t30007/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t30007_package: type: package diff --git a/tests/t30007/test_case.h b/tests/t30007/test_case.h index 6262c0c5..9287c03d 100644 --- a/tests/t30007/test_case.h +++ b/tests/t30007/test_case.h @@ -45,8 +45,7 @@ TEST_CASE("t30007", "[test-case][package]") REQUIRE_THAT(puml, IsLayoutHint(_A("C"), "up", _A("AA"))); REQUIRE_THAT(puml, IsLayoutHint(_A("C"), "left", _A("B"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -62,6 +61,6 @@ TEST_CASE("t30007", "[test-case][package]") REQUIRE(IsDependency(j, "A::AA", "B")); REQUIRE(IsDependency(j, "A::AA", "C")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } diff --git a/tests/t30008/.clang-uml b/tests/t30008/.clang-uml index 60e4959d..9325c7af 100644 --- a/tests/t30008/.clang-uml +++ b/tests/t30008/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t30008_package: type: package diff --git a/tests/t30008/test_case.h b/tests/t30008/test_case.h index a6bd9b7b..8ced1931 100644 --- a/tests/t30008/test_case.h +++ b/tests/t30008/test_case.h @@ -51,8 +51,7 @@ TEST_CASE("t30008", "[test-case][package]") REQUIRE_THAT(puml, IsDependency(_A("E"), _A("D"))); REQUIRE_THAT(puml, IsDependency(_A("F"), _A("E"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -76,6 +75,6 @@ TEST_CASE("t30008", "[test-case][package]") REQUIRE(IsDependency(j, "dependencies::E", "dependencies::D")); REQUIRE(IsDependency(j, "dependencies::F", "dependencies::E")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } diff --git a/tests/t30009/.clang-uml b/tests/t30009/.clang-uml index 9452c160..13e21029 100644 --- a/tests/t30009/.clang-uml +++ b/tests/t30009/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t30009_package: type: package diff --git a/tests/t30009/test_case.h b/tests/t30009/test_case.h index 8ee85cfb..1d36c541 100644 --- a/tests/t30009/test_case.h +++ b/tests/t30009/test_case.h @@ -43,8 +43,7 @@ TEST_CASE("t30009", "[test-case][package]") REQUIRE_THAT(puml, IsPackage("C")); REQUIRE_THAT(puml, IsPackage("D")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -63,6 +62,6 @@ TEST_CASE("t30009", "[test-case][package]") REQUIRE(IsPackage(j, "Two::C")); REQUIRE(IsPackage(j, "Two::D")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t30010/.clang-uml b/tests/t30010/.clang-uml index 22f72ba3..9dc1339a 100644 --- a/tests/t30010/.clang-uml +++ b/tests/t30010/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t30010_package: type: package diff --git a/tests/t30010/test_case.h b/tests/t30010/test_case.h index 943da222..21f2f277 100644 --- a/tests/t30010/test_case.h +++ b/tests/t30010/test_case.h @@ -47,8 +47,7 @@ TEST_CASE("t30010", "[test-case][package]") REQUIRE_THAT(puml, IsDependency(_A("app"), _A("lib3"))); REQUIRE_THAT(puml, IsDependency(_A("app"), _A("lib4"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -56,6 +55,6 @@ TEST_CASE("t30010", "[test-case][package]") using namespace json; - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t30011/.clang-uml b/tests/t30011/.clang-uml index 33463e69..a379b981 100644 --- a/tests/t30011/.clang-uml +++ b/tests/t30011/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t30011_package: type: package diff --git a/tests/t30011/test_case.h b/tests/t30011/test_case.h index b78c2c41..794934d8 100644 --- a/tests/t30011/test_case.h +++ b/tests/t30011/test_case.h @@ -47,8 +47,7 @@ TEST_CASE("t30011", "[test-case][package]") REQUIRE_THAT(puml, IsDependency(_A("app"), _A("lib3"))); REQUIRE_THAT(puml, IsDependency(_A("app"), _A("lib4"))); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -56,6 +55,6 @@ TEST_CASE("t30011", "[test-case][package]") using namespace json; - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } \ No newline at end of file diff --git a/tests/t40001/.clang-uml b/tests/t40001/.clang-uml index 208c7397..7400619d 100644 --- a/tests/t40001/.clang-uml +++ b/tests/t40001/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t40001_include: type: include diff --git a/tests/t40001/test_case.h b/tests/t40001/test_case.h index 70b5ec90..9f58a9e1 100644 --- a/tests/t40001/test_case.h +++ b/tests/t40001/test_case.h @@ -53,8 +53,7 @@ TEST_CASE("t40001", "[test-case][include]") REQUIRE_THAT(puml, HasComment("t40001 test diagram of type include")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -78,6 +77,6 @@ TEST_CASE("t40001", "[test-case][include]") j, "include/t40001_include1.h", "include/lib1/lib1.h")); REQUIRE(IsDependency(j, "include/t40001_include1.h", "string")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } diff --git a/tests/t40002/.clang-uml b/tests/t40002/.clang-uml index 84c790a2..21514d18 100644 --- a/tests/t40002/.clang-uml +++ b/tests/t40002/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t40002_include: type: include diff --git a/tests/t40002/test_case.h b/tests/t40002/test_case.h index 67bb22b2..c57831bb 100644 --- a/tests/t40002/test_case.h +++ b/tests/t40002/test_case.h @@ -80,8 +80,7 @@ TEST_CASE("t40002", "[test-case][include]") clanguml::util::get_git_commit()), "lib2.h")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -109,6 +108,6 @@ TEST_CASE("t40002", "[test-case][include]") REQUIRE(IsAssociation(j, "src/lib1/lib1.cc", "include/lib1/lib1.h")); REQUIRE(IsAssociation(j, "src/lib2/lib2.cc", "include/lib2/lib2.h")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } diff --git a/tests/t40003/.clang-uml b/tests/t40003/.clang-uml index be81eb3a..782b375a 100644 --- a/tests/t40003/.clang-uml +++ b/tests/t40003/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t40003_include: type: include diff --git a/tests/t40003/test_case.h b/tests/t40003/test_case.h index 966c7fdc..5a847234 100644 --- a/tests/t40003/test_case.h +++ b/tests/t40003/test_case.h @@ -47,8 +47,7 @@ TEST_CASE("t40003", "[test-case][include]") REQUIRE_THAT(puml, IsFile("t5.h")); REQUIRE_THAT(puml, !IsFile("t6.h")); - save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } { @@ -73,6 +72,6 @@ TEST_CASE("t40003", "[test-case][include]") REQUIRE(!IsFile(j, "include/dependencies/t4.h")); REQUIRE(IsFile(j, "src/dependencies/t2.cc")); - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } diff --git a/tests/t90000/.clang-uml b/tests/t90000/.clang-uml index 86079718..e09671a3 100644 --- a/tests/t90000/.clang-uml +++ b/tests/t90000/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: t90000_class: type: class diff --git a/tests/t90000/test_case.h b/tests/t90000/test_case.h index 5074f76e..dda3d671 100644 --- a/tests/t90000/test_case.h +++ b/tests/t90000/test_case.h @@ -35,5 +35,5 @@ TEST_CASE("t90000", "[test-case][config]") REQUIRE_THAT(puml, IsClass(_A("Foo"))); REQUIRE_THAT(puml, IsClass(_A("Boo"))); - save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory(), diagram->name + ".puml", puml); } diff --git a/tests/test_cases.cc b/tests/test_cases.cc index 64874fac..e49adbf0 100644 --- a/tests/test_cases.cc +++ b/tests/test_cases.cc @@ -235,36 +235,51 @@ std::string generate_class_mermaid( config, model); } -void save_puml(const std::string &path, const std::string &puml) +template +void save_diagram(const std::filesystem::path &path, const T &diagram) { - std::filesystem::path p{path}; - std::filesystem::create_directory(p.parent_path()); + static_assert( + std::same_as || std::same_as); + + std::filesystem::create_directories(path.parent_path()); std::ofstream ofs; - ofs.open(p, std::ofstream::out | std::ofstream::trunc); - ofs << puml; + ofs.open(path, std::ofstream::out | std::ofstream::trunc); + if constexpr (std::same_as) { + ofs << std::setw(2) << diagram; + } + else { + ofs << diagram; + } + ofs.close(); } -void save_json(const std::string &path, const nlohmann::json &j) +void save_puml(const std::string &path, const std::string &filename, + const std::string &puml) { std::filesystem::path p{path}; - std::filesystem::create_directory(p.parent_path()); - std::ofstream ofs; - ofs.open(p, std::ofstream::out | std::ofstream::trunc); - ofs << std::setw(2) << j; - ofs.close(); + p /= "puml"; + p /= filename; + save_diagram(p, puml); } -void save_mermaid(const std::string &path, const std::string &mmd) +void save_json(const std::string &path, const std::string &filename, + const nlohmann::json &j) { std::filesystem::path p{path}; - std::filesystem::create_directory(p.parent_path()); - std::ofstream ofs; - ofs.open(p, std::ofstream::out | std::ofstream::trunc); - ofs << mmd; - ofs.close(); + p /= "json"; + p /= filename; + save_diagram(p, j); } +void save_mermaid(const std::string &path, const std::string &filename, + const std::string &mmd) +{ + std::filesystem::path p{path}; + p /= "mermaid"; + p /= filename; + save_diagram(p, mmd); +} using namespace clanguml::test::matchers; diff --git a/tests/test_cases.h b/tests/test_cases.h index 8c9aa56d..9dc32df5 100644 --- a/tests/test_cases.h +++ b/tests/test_cases.h @@ -19,8 +19,8 @@ #define SPDLOG_ACTIVE_LEVEL SPDLOG_LEVEL_DEBUG -#include "class_diagram/generators/plantuml/class_diagram_generator.h" #include "class_diagram/generators/mermaid/class_diagram_generator.h" +#include "class_diagram/generators/plantuml/class_diagram_generator.h" #include "class_diagram/model/diagram.h" #include "class_diagram/visitor/translation_unit_visitor.h" #include "common/clang_utils.h" diff --git a/util/generate_mermaid.py b/util/generate_mermaid.py new file mode 100644 index 00000000..a7cccce0 --- /dev/null +++ b/util/generate_mermaid.py @@ -0,0 +1,47 @@ +#!/usr/bin/python3 + +## +## util/validate_json.py +## +## Copyright (c) 2021-2023 Bartek Kryza +## +## Licensed under the Apache License, Version 2.0 (the "License"); +## you may not use this file except in compliance with the License. +## You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. +## +import sys +import subprocess + +from pathlib import Path + +def print_usage(): + print(f'Usage: ./generate_mermaid.py file1.mmd file2.mmd ...') + + +files = sys.argv[1:] + + +if not files: + print_usage() + sys.exit(1) + +ok = 0 + +for f in files: + try: + print(f'Generating Mermaid diagram from {f}') + f_svg = Path(f).with_suffix('.png') + subprocess.check_call(['mmdc', '-i', f, '-o', f_svg]) + except subprocess.CalledProcessError: + ok = 1 + print(f'ERROR: Generating Mermaid diagram from {f} failed') + +sys.exit(ok) diff --git a/util/generate_test_cases_docs.py b/util/generate_test_cases_docs.py index ea6018d1..644c5138 100755 --- a/util/generate_test_cases_docs.py +++ b/util/generate_test_cases_docs.py @@ -69,12 +69,18 @@ with open(r'tests/test_cases.yaml') as f: # Copy and link the diagram image config_dict = yaml.full_load(config) - tc.write("## Generated UML diagrams\n") + tc.write("## Generated PlantUML diagrams\n") for diagram_name, _ in config_dict['diagrams'].items(): - copyfile(f'debug/tests/puml/{diagram_name}.svg', + copyfile(f'debug/tests/diagrams/puml/{diagram_name}.svg', f'docs/test_cases/{diagram_name}.svg') tc.write(f'![{diagram_name}](./{diagram_name}.svg "{test_case["title"]}")\n') + tc.write("## Generated Mermaid diagrams\n") + for diagram_name, _ in config_dict['diagrams'].items(): + copyfile(f'debug/tests/diagrams/mermaid/{diagram_name}.svg', + f'docs/test_cases/{diagram_name}_mmd.svg') + tc.write(f'![{diagram_name}](./{diagram_name}_mmd.svg "{test_case["title"]}")\n') + tc.write("## Generated JSON models\n") for diagram_name, _ in config_dict['diagrams'].items(): if os.path.exists(f'debug/tests/puml/{diagram_name}.json'): diff --git a/util/templates/test_cases/.clang-uml b/util/templates/test_cases/.clang-uml index 63e89fab..8864bbd0 100644 --- a/util/templates/test_cases/.clang-uml +++ b/util/templates/test_cases/.clang-uml @@ -1,5 +1,5 @@ compilation_database_dir: .. -output_directory: puml +output_directory: diagrams diagrams: {{ name }}_{{ type }}: type: {{ type }} diff --git a/util/templates/test_cases/test_case.h b/util/templates/test_cases/test_case.h index 9289b364..5aba84d9 100644 --- a/util/templates/test_cases/test_case.h +++ b/util/templates/test_cases/test_case.h @@ -38,7 +38,7 @@ TEST_CASE("{{ name }}", "[test-case][{{ type }}]") {{ examples }} save_puml( - config.output_directory() + "/" + diagram->name + ".puml", puml); + config.output_directory(), diagram->name + ".puml", puml); } { @@ -46,7 +46,7 @@ TEST_CASE("{{ name }}", "[test-case][{{ type }}]") using namespace json; - save_json(config.output_directory() + "/" + diagram->name + ".json", j); + save_json(config.output_directory(), diagram->name + ".json", j); } } diff --git a/util/validate_json.py b/util/validate_json.py new file mode 100644 index 00000000..2ff691a6 --- /dev/null +++ b/util/validate_json.py @@ -0,0 +1,46 @@ +#!/usr/bin/python3 + +## +## util/validate_json.py +## +## Copyright (c) 2021-2023 Bartek Kryza +## +## Licensed under the Apache License, Version 2.0 (the "License"); +## you may not use this file except in compliance with the License. +## You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. +## +import sys +import json + + +def print_usage(): + print(f'Usage: ./validate_json.py file1.json file2.json ...') + + +files = sys.argv[1:] + + +if not files: + print_usage() + sys.exit(1) + +ok = 0 + +for f in files: + with open(f, 'r') as file: + try: + json.load(file) + print(f'File {f} is valid') + except ValueError: + ok = 1 + print(f'File {f} is invalid') + +sys.exit(ok) \ No newline at end of file