From a1f7769ba589b4483b7138eef9aa0872b4ff142e Mon Sep 17 00:00:00 2001 From: Bartek Kryza Date: Sat, 9 Dec 2023 17:35:15 +0100 Subject: [PATCH] Simplified test cases configs --- src/config/config.h | 24 +++--- src/config/yaml_decoders.cc | 44 +++++----- tests/t00002/.clang-uml | 7 +- tests/t00003/.clang-uml | 4 +- tests/t00004/.clang-uml | 9 +- tests/t00005/.clang-uml | 7 +- tests/t00006/.clang-uml | 7 +- tests/t00007/.clang-uml | 7 +- tests/t00008/.clang-uml | 7 +- tests/t00009/.clang-uml | 7 +- tests/t00010/.clang-uml | 7 +- tests/t00011/.clang-uml | 7 +- tests/t00012/.clang-uml | 7 +- tests/t00013/.clang-uml | 7 +- tests/t00014/.clang-uml | 8 +- tests/t00015/.clang-uml | 7 +- tests/t00016/.clang-uml | 7 +- tests/t00017/.clang-uml | 7 +- tests/t00018/.clang-uml | 7 +- tests/t00019/.clang-uml | 7 +- tests/t00020/.clang-uml | 7 +- tests/t00021/.clang-uml | 7 +- tests/t00022/.clang-uml | 7 +- tests/t00023/.clang-uml | 7 +- tests/t00024/.clang-uml | 7 +- tests/t00025/.clang-uml | 7 +- tests/t00026/.clang-uml | 7 +- tests/t00027/.clang-uml | 7 +- tests/t00028/.clang-uml | 7 +- tests/t00029/.clang-uml | 7 +- tests/t00030/.clang-uml | 7 +- tests/t00031/.clang-uml | 7 +- tests/t00032/.clang-uml | 7 +- tests/t00033/.clang-uml | 7 +- tests/t00034/.clang-uml | 7 +- tests/t00035/.clang-uml | 7 +- tests/t00036/.clang-uml | 7 +- tests/t00037/.clang-uml | 7 +- tests/t00038/.clang-uml | 7 +- tests/t00039/.clang-uml | 7 +- tests/t00040/.clang-uml | 7 +- tests/t00041/.clang-uml | 7 +- tests/t00042/.clang-uml | 7 +- tests/t00043/.clang-uml | 7 +- tests/t00044/.clang-uml | 7 +- tests/t00045/.clang-uml | 4 +- tests/t00046/.clang-uml | 4 +- tests/t00047/.clang-uml | 4 +- tests/t00048/.clang-uml | 8 +- tests/t00049/.clang-uml | 4 +- tests/t00050/.clang-uml | 4 +- tests/t00051/.clang-uml | 7 +- tests/t00051/test_case.h | 44 +++++----- tests/t00052/.clang-uml | 7 +- tests/t00053/.clang-uml | 7 +- tests/t00054/.clang-uml | 7 +- tests/t00055/.clang-uml | 7 +- tests/t00056/.clang-uml | 7 +- tests/t00057/.clang-uml | 6 +- tests/t00058/.clang-uml | 7 +- tests/t00059/.clang-uml | 7 +- tests/t00060/.clang-uml | 7 +- tests/t00061/.clang-uml | 6 +- tests/t00062/.clang-uml | 7 +- tests/t00063/.clang-uml | 7 +- tests/t00064/.clang-uml | 7 +- tests/t00065/.clang-uml | 6 +- tests/t00066/.clang-uml | 7 +- tests/t00067/.clang-uml | 7 +- tests/t00068/.clang-uml | 17 ++-- tests/t20001/.clang-uml | 7 +- tests/t20002/.clang-uml | 7 +- tests/t20003/.clang-uml | 7 +- tests/t20004/.clang-uml | 7 +- tests/t20005/.clang-uml | 7 +- tests/t20006/.clang-uml | 7 +- tests/t20007/.clang-uml | 7 +- tests/t20008/.clang-uml | 7 +- tests/t20009/.clang-uml | 7 +- tests/t20010/.clang-uml | 7 +- tests/t20011/.clang-uml | 7 +- tests/t20012/.clang-uml | 7 +- tests/t20012/test_case.h | 86 +++++++------------ tests/t20013/.clang-uml | 7 +- tests/t20014/.clang-uml | 13 ++- tests/t20015/.clang-uml | 7 +- tests/t20016/.clang-uml | 7 +- tests/t20017/.clang-uml | 3 - tests/t20018/.clang-uml | 7 +- tests/t20019/.clang-uml | 7 +- tests/t20020/.clang-uml | 7 +- tests/t20021/.clang-uml | 7 +- tests/t20022/.clang-uml | 7 +- tests/t20023/.clang-uml | 7 +- tests/t20024/.clang-uml | 7 +- tests/t20025/.clang-uml | 7 +- tests/t20026/.clang-uml | 7 +- tests/t20027/.clang-uml | 7 +- tests/t20028/.clang-uml | 7 +- tests/t20029/.clang-uml | 7 +- tests/t20030/.clang-uml | 7 +- tests/t20031/.clang-uml | 7 +- tests/t20032/.clang-uml | 7 +- tests/t20033/.clang-uml | 7 +- tests/t20034/.clang-uml | 7 +- tests/t20035/.clang-uml | 7 +- tests/t20036/.clang-uml | 7 +- tests/t20037/.clang-uml | 7 +- tests/t20038/.clang-uml | 7 +- tests/t30001/.clang-uml | 7 +- tests/t30002/.clang-uml | 7 +- tests/t30003/.clang-uml | 7 +- tests/t30004/.clang-uml | 7 +- tests/t30005/.clang-uml | 7 +- tests/t30006/.clang-uml | 7 +- tests/t30007/.clang-uml | 7 +- tests/t30008/.clang-uml | 7 +- tests/t30009/.clang-uml | 7 +- tests/t30010/.clang-uml | 6 +- tests/t30011/.clang-uml | 3 - tests/t40001/.clang-uml | 3 - tests/t40002/.clang-uml | 3 - tests/t40003/.clang-uml | 3 - tests/t90000/.clang-uml | 2 - tests/test_cases.cc | 27 +++--- tests/test_compilation_database.cc | 43 +++++++++- tests/test_config.cc | 28 ++++++ tests/test_config_data/relative_to.yml | 11 +++ .../test_config_data/relative_to_default.yml | 5 ++ 129 files changed, 412 insertions(+), 713 deletions(-) create mode 100644 tests/test_config_data/relative_to.yml create mode 100644 tests/test_config_data/relative_to_default.yml diff --git a/src/config/config.h b/src/config/config.h index 972dd069..5c219910 100644 --- a/src/config/config.h +++ b/src/config/config.h @@ -456,6 +456,18 @@ struct inheritable_diagram_options { std::string simplify_template_type(std::string full_name) const; + /** + * @brief Get reference to `relative_to` diagram config option + * + * This method is only to allow access to `relative_to` for loading + * and adjusting configuration file and for making test cases work. + * + * Instead use @see config::diagram::root_directory() method. + * + * @return Reference to `relative_to` config option. + */ + option &get_relative_to() { return relative_to; } + option> glob{"glob"}; option using_namespace{"using_namespace"}; option include_relations_also_as_members{ @@ -499,18 +511,6 @@ struct inheritable_diagram_options { option debug_mode{"debug_mode", false}; option generate_metadata{"generate_metadata", true}; - /** - * @brief Get reference to `relative_to` diagram config option - * - * This method is only to allow access to `relative_to` for loading - * and adjusting configuration file and for making test cases work. - * - * Instead use @see config::diagram::root_directory() method. - * - * @return Reference to `relative_to` config option. - */ - option &get_relative_to() { return relative_to; } - protected: // This is the relative path with respect to the `base_directory`, // against which all matches are made, if not provided it defaults to diff --git a/src/config/yaml_decoders.cc b/src/config/yaml_decoders.cc index fb37a715..999a3d83 100644 --- a/src/config/yaml_decoders.cc +++ b/src/config/yaml_decoders.cc @@ -578,6 +578,7 @@ template bool decode_diagram(const Node &node, T &rhs) get_option(node, rhs.debug_mode); get_option(node, rhs.generate_metadata); get_option(node, rhs.title); + get_option(node, rhs.get_relative_to()); return true; } @@ -602,6 +603,7 @@ template <> struct convert { get_option(node, rhs.skip_redundant_dependencies); get_option(node, rhs.relationship_hints); get_option(node, rhs.type_aliases); + get_option(node, rhs.get_relative_to()); rhs.initialize_relationship_hints(); @@ -626,16 +628,12 @@ template <> struct convert { get_option(node, rhs.combine_free_functions_into_file_participants); get_option(node, rhs.generate_return_types); get_option(node, rhs.generate_condition_statements); - get_option(node, rhs.get_relative_to()); get_option(node, rhs.participants_order); get_option(node, rhs.generate_method_arguments); get_option(node, rhs.generate_message_comments); get_option(node, rhs.message_comment_width); - // Ensure relative_to has a value - if (!rhs.get_relative_to().has_value) - rhs.get_relative_to().set( - std::filesystem::current_path().lexically_normal()); + get_option(node, rhs.get_relative_to()); rhs.initialize_type_aliases(); @@ -653,13 +651,9 @@ template <> struct convert { return false; get_option(node, rhs.layout); - get_option(node, rhs.get_relative_to()); get_option(node, rhs.package_type); - // Ensure relative_to has a value - if (!rhs.get_relative_to().has_value) - rhs.get_relative_to().set( - std::filesystem::current_path().lexically_normal()); + get_option(node, rhs.get_relative_to()); return true; } @@ -675,12 +669,9 @@ template <> struct convert { return false; get_option(node, rhs.layout); - get_option(node, rhs.get_relative_to()); get_option(node, rhs.generate_system_headers); - if (!rhs.get_relative_to().has_value) - rhs.get_relative_to().set( - std::filesystem::current_path().lexically_normal()); + get_option(node, rhs.get_relative_to()); return true; } @@ -862,27 +853,29 @@ void config::inherit() { for (auto &[name, diagram] : diagrams) { diagram->inherit(*this); + + assert(diagram->get_relative_to().has_value); } } namespace { -void resolve_option_path(YAML::Node &doc, const std::string &option) +void resolve_option_path(YAML::Node &doc, const std::string &option_name) { std::filesystem::path relative_to_path{ doc["relative_to"].as()}; assert(relative_to_path.is_absolute()); - std::filesystem::path option_path{doc[option].as()}; + std::filesystem::path option_path{doc[option_name].as()}; if (option_path.is_absolute()) return; - option_path = relative_to_path / option_path.string(); + option_path = relative_to_path / option_path; option_path = option_path.lexically_normal(); option_path.make_preferred(); - doc[option] = option_path.string(); + doc[option_name] = option_path.string(); } } // namespace @@ -909,7 +902,7 @@ config load(const std::string &config_file, bool inherit, } // Store the parent path of the config_file to properly resolve - // the include files paths + // relative paths in config file if (has_key(doc, "__parent_path")) doc.remove("__parent_path"); if (config_file == "-") { @@ -918,11 +911,13 @@ config load(const std::string &config_file, bool inherit, } else { config_file_path = - std::filesystem::absolute(std::filesystem::path{config_file}); + canonical(absolute(std::filesystem::path{config_file})); doc.force_insert( "__parent_path", config_file_path.parent_path().string()); } + LOG_DBG("Effective config file path is {}", config_file_path.string()); + // // If no relative_to path is specified in the config, make all paths // resolvable against the parent directory of the .clang-uml config @@ -931,9 +926,11 @@ config load(const std::string &config_file, bool inherit, // if (!doc["relative_to"]) { bool paths_relative_to_config_file = true; + if (doc["paths_relative_to_config_file"] && !doc["paths_relative_to_config_file"].as()) paths_relative_to_config_file = false; + if (paths_relative_to_pwd && *paths_relative_to_pwd) paths_relative_to_config_file = false; @@ -950,7 +947,14 @@ config load(const std::string &config_file, bool inherit, // // Resolve common path-like config options relative to `relative_to` // + if (!doc["output_directory"]) { + doc["output_directory"] = "."; + } resolve_option_path(doc, "output_directory"); + + if (!doc["compilation_database_dir"]) { + doc["compilation_database_dir"] = "."; + } resolve_option_path(doc, "compilation_database_dir"); // If the current directory is also a git repository, diff --git a/tests/t00002/.clang-uml b/tests/t00002/.clang-uml index 6be32519..afe97bc1 100644 --- a/tests/t00002/.clang-uml +++ b/tests/t00002/.clang-uml @@ -1,14 +1,11 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00002_class: type: class title: Basic class diagram example glob: - - tests/t00002/t00002.cc + - t00002.cc comment_parser: clang - using_namespace: - - clanguml::t00002 + using_namespace: clanguml::t00002 include: namespaces: - clanguml::t00002 diff --git a/tests/t00003/.clang-uml b/tests/t00003/.clang-uml index 3ba372b8..24a271d9 100644 --- a/tests/t00003/.clang-uml +++ b/tests/t00003/.clang-uml @@ -1,10 +1,8 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00003_class: type: class glob: - - tests/t00003/t00003.cc + - t00003.cc using_namespace: clanguml::t00003 include: namespaces: diff --git a/tests/t00004/.clang-uml b/tests/t00004/.clang-uml index 42c6e396..21d5931b 100644 --- a/tests/t00004/.clang-uml +++ b/tests/t00004/.clang-uml @@ -1,14 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00004_class: type: class glob: - - tests/t00004/t00004.cc - using_namespace: - - clanguml::t00004 - - clanguml::t00004::A - - clanguml::t00004::A::AA + - t00004.cc + using_namespace: clanguml::t00004 include: namespaces: - clanguml::t00004 diff --git a/tests/t00005/.clang-uml b/tests/t00005/.clang-uml index 499c750e..ccabd2f9 100644 --- a/tests/t00005/.clang-uml +++ b/tests/t00005/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00005_class: type: class glob: - - tests/t00005/t00005.cc - using_namespace: - - clanguml::t00005 + - t00005.cc + using_namespace: clanguml::t00005 include: namespaces: - clanguml::t00005 diff --git a/tests/t00006/.clang-uml b/tests/t00006/.clang-uml index e6a0b5fe..bf3b4c1a 100644 --- a/tests/t00006/.clang-uml +++ b/tests/t00006/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00006_class: type: class glob: - - tests/t00006/t00006.cc - using_namespace: - - clanguml::t00006 + - t00006.cc + using_namespace: clanguml::t00006 include: namespaces: - clanguml::t00006 diff --git a/tests/t00007/.clang-uml b/tests/t00007/.clang-uml index 06f50660..42f037c5 100644 --- a/tests/t00007/.clang-uml +++ b/tests/t00007/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00007_class: type: class glob: - - tests/t00007/t00007.cc - using_namespace: - - clanguml::t00007 + - t00007.cc + using_namespace: clanguml::t00007 include: namespaces: - clanguml::t00007 diff --git a/tests/t00008/.clang-uml b/tests/t00008/.clang-uml index 90127280..8042ed3f 100644 --- a/tests/t00008/.clang-uml +++ b/tests/t00008/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00008_class: type: class glob: - - tests/t00008/t00008.cc - using_namespace: - - clanguml::t00008 + - t00008.cc + using_namespace: clanguml::t00008 include: namespaces: - clanguml::t00008 diff --git a/tests/t00009/.clang-uml b/tests/t00009/.clang-uml index 166c9fb8..34653ebf 100644 --- a/tests/t00009/.clang-uml +++ b/tests/t00009/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00009_class: type: class glob: - - tests/t00009/t00009.cc - using_namespace: - - clanguml::t00009 + - t00009.cc + using_namespace: clanguml::t00009 include: namespaces: - clanguml::t00009 diff --git a/tests/t00010/.clang-uml b/tests/t00010/.clang-uml index 64666350..13eac509 100644 --- a/tests/t00010/.clang-uml +++ b/tests/t00010/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00010_class: type: class glob: - - tests/t00010/t00010.cc - using_namespace: - - clanguml::t00010 + - t00010.cc + using_namespace: clanguml::t00010 include: namespaces: - clanguml::t00010 diff --git a/tests/t00011/.clang-uml b/tests/t00011/.clang-uml index 8bda9ff2..d4eb99ac 100644 --- a/tests/t00011/.clang-uml +++ b/tests/t00011/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00011_class: type: class glob: - - tests/t00011/t00011.cc - using_namespace: - - clanguml::t00011 + - t00011.cc + using_namespace: clanguml::t00011 include: namespaces: - clanguml::t00011 diff --git a/tests/t00012/.clang-uml b/tests/t00012/.clang-uml index 9cdd9b54..65b59c58 100644 --- a/tests/t00012/.clang-uml +++ b/tests/t00012/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00012_class: type: class glob: - - tests/t00012/t00012.cc - using_namespace: - - clanguml::t00012 + - t00012.cc + using_namespace: clanguml::t00012 include: namespaces: - clanguml::t00012 diff --git a/tests/t00013/.clang-uml b/tests/t00013/.clang-uml index 7ae839d1..2c0db57f 100644 --- a/tests/t00013/.clang-uml +++ b/tests/t00013/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00013_class: type: class glob: - - tests/t00013/t00013.cc - using_namespace: - - clanguml::t00013 + - t00013.cc + using_namespace: clanguml::t00013 include: namespaces: - clanguml::t00013 diff --git a/tests/t00014/.clang-uml b/tests/t00014/.clang-uml index e5e17265..d370a04e 100644 --- a/tests/t00014/.clang-uml +++ b/tests/t00014/.clang-uml @@ -1,13 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00014_class: type: class glob: - - tests/t00014/t00014.cc -# relative_to: ../../.. - using_namespace: - - clanguml::t00014 + - t00014.cc + using_namespace: clanguml::t00014 include: namespaces: - clanguml::t00014 diff --git a/tests/t00015/.clang-uml b/tests/t00015/.clang-uml index 6c10e085..847bf6b3 100644 --- a/tests/t00015/.clang-uml +++ b/tests/t00015/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00015_class: type: class glob: - - tests/t00015/t00015.cc - using_namespace: - - clanguml::t00015 + - t00015.cc + using_namespace: clanguml::t00015 include: namespaces: - clanguml::t00015 diff --git a/tests/t00016/.clang-uml b/tests/t00016/.clang-uml index e7aa6fd6..7b0d1b58 100644 --- a/tests/t00016/.clang-uml +++ b/tests/t00016/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00016_class: type: class glob: - - tests/t00016/t00016.cc - using_namespace: - - clanguml::t00016 + - t00016.cc + using_namespace: clanguml::t00016 include: namespaces: - clanguml::t00016 diff --git a/tests/t00017/.clang-uml b/tests/t00017/.clang-uml index 2c221bae..6ea65a5c 100644 --- a/tests/t00017/.clang-uml +++ b/tests/t00017/.clang-uml @@ -1,13 +1,10 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00017_class: type: class include_relations_also_as_members: false glob: - - tests/t00017/t00017.cc - using_namespace: - - clanguml::t00017 + - t00017.cc + using_namespace: clanguml::t00017 include: namespaces: - clanguml::t00017 diff --git a/tests/t00018/.clang-uml b/tests/t00018/.clang-uml index 43fdd795..e0dee195 100644 --- a/tests/t00018/.clang-uml +++ b/tests/t00018/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00018_class: type: class glob: - - tests/t00018/**.cc - using_namespace: - - clanguml::t00018 + - "*.cc" + using_namespace: clanguml::t00018 include: namespaces: - clanguml::t00018 diff --git a/tests/t00019/.clang-uml b/tests/t00019/.clang-uml index 9f6244b2..8cda1d78 100644 --- a/tests/t00019/.clang-uml +++ b/tests/t00019/.clang-uml @@ -1,13 +1,10 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00019_class: type: class glob: - - tests/t00019/**.cc + - "*.cc" generate_template_argument_dependencies: false - using_namespace: - - clanguml::t00019 + using_namespace: clanguml::t00019 include: namespaces: - clanguml::t00019 diff --git a/tests/t00020/.clang-uml b/tests/t00020/.clang-uml index b18c4092..a0f03ac9 100644 --- a/tests/t00020/.clang-uml +++ b/tests/t00020/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00020_class: type: class glob: - - tests/t00020/t00020.cc - using_namespace: - - clanguml::t00020 + - t00020.cc + using_namespace: clanguml::t00020 include: namespaces: - clanguml::t00020 diff --git a/tests/t00021/.clang-uml b/tests/t00021/.clang-uml index 242a68e8..649c3cde 100644 --- a/tests/t00021/.clang-uml +++ b/tests/t00021/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00021_class: type: class glob: - - tests/t00021/t00021.cc - using_namespace: - - clanguml::t00021 + - t00021.cc + using_namespace: clanguml::t00021 include: namespaces: - clanguml::t00021 diff --git a/tests/t00022/.clang-uml b/tests/t00022/.clang-uml index 52cae5ec..18907b8e 100644 --- a/tests/t00022/.clang-uml +++ b/tests/t00022/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00022_class: type: class glob: - - tests/t00022/t00022.cc - using_namespace: - - clanguml::t00022 + - t00022.cc + using_namespace: clanguml::t00022 include: namespaces: - clanguml::t00022 diff --git a/tests/t00023/.clang-uml b/tests/t00023/.clang-uml index 5635666c..29d719f5 100644 --- a/tests/t00023/.clang-uml +++ b/tests/t00023/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00023_class: type: class glob: - - tests/t00023/t00023.cc - using_namespace: - - clanguml::t00023 + - t00023.cc + using_namespace: clanguml::t00023 include: namespaces: - clanguml::t00023 diff --git a/tests/t00024/.clang-uml b/tests/t00024/.clang-uml index b5ee9373..249d9b46 100644 --- a/tests/t00024/.clang-uml +++ b/tests/t00024/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00024_class: type: class glob: - - tests/t00024/t00024.cc - using_namespace: - - clanguml::t00024 + - t00024.cc + using_namespace: clanguml::t00024 include: namespaces: - clanguml::t00024 diff --git a/tests/t00025/.clang-uml b/tests/t00025/.clang-uml index ad285640..5dced1b2 100644 --- a/tests/t00025/.clang-uml +++ b/tests/t00025/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00025_class: type: class glob: - - tests/t00025/t00025.cc - using_namespace: - - clanguml::t00025 + - /t00025.cc + using_namespace: clanguml::t00025 include: namespaces: - clanguml::t00025 diff --git a/tests/t00026/.clang-uml b/tests/t00026/.clang-uml index e985c8ed..127242d2 100644 --- a/tests/t00026/.clang-uml +++ b/tests/t00026/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00026_class: type: class glob: - - tests/t00026/t00026.cc - using_namespace: - - clanguml::t00026 + - t00026.cc + using_namespace: clanguml::t00026 include: namespaces: - clanguml::t00026 diff --git a/tests/t00027/.clang-uml b/tests/t00027/.clang-uml index 06cfa721..1d467ce4 100644 --- a/tests/t00027/.clang-uml +++ b/tests/t00027/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00027_class: type: class glob: - - tests/t00027/t00027.cc - using_namespace: - - clanguml::t00027 + - t00027.cc + using_namespace: clanguml::t00027 include: namespaces: - clanguml::t00027 diff --git a/tests/t00028/.clang-uml b/tests/t00028/.clang-uml index 466d1027..ad7c4a81 100644 --- a/tests/t00028/.clang-uml +++ b/tests/t00028/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00028_class: type: class glob: - - tests/t00028/t00028.cc - using_namespace: - - clanguml::t00028 + - t00028.cc + using_namespace: clanguml::t00028 include: namespaces: - clanguml::t00028 diff --git a/tests/t00029/.clang-uml b/tests/t00029/.clang-uml index 164d8405..fa5d8480 100644 --- a/tests/t00029/.clang-uml +++ b/tests/t00029/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00029_class: type: class glob: - - tests/t00029/t00029.cc - using_namespace: - - clanguml::t00029 + - t00029.cc + using_namespace: clanguml::t00029 include: namespaces: - clanguml::t00029 diff --git a/tests/t00030/.clang-uml b/tests/t00030/.clang-uml index c4ef6dc2..fbaf54d2 100644 --- a/tests/t00030/.clang-uml +++ b/tests/t00030/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00030_class: type: class glob: - - tests/t00030/t00030.cc - using_namespace: - - clanguml::t00030 + - t00030.cc + using_namespace: clanguml::t00030 include: namespaces: - clanguml::t00030 diff --git a/tests/t00031/.clang-uml b/tests/t00031/.clang-uml index 64c1bf0c..85b5e206 100644 --- a/tests/t00031/.clang-uml +++ b/tests/t00031/.clang-uml @@ -1,13 +1,10 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00031_class: type: class glob: - - tests/t00031/t00031.cc + - t00031.cc skip_redundant_dependencies: false - using_namespace: - - clanguml::t00031 + using_namespace: clanguml::t00031 include: namespaces: - clanguml::t00031 diff --git a/tests/t00032/.clang-uml b/tests/t00032/.clang-uml index 4820d73d..ec03a97b 100644 --- a/tests/t00032/.clang-uml +++ b/tests/t00032/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00032_class: type: class glob: - - tests/t00032/t00032.cc - using_namespace: - - clanguml::t00032 + - t00032.cc + using_namespace: clanguml::t00032 include: namespaces: - clanguml::t00032 diff --git a/tests/t00033/.clang-uml b/tests/t00033/.clang-uml index f9a3d408..27279195 100644 --- a/tests/t00033/.clang-uml +++ b/tests/t00033/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00033_class: type: class glob: - - tests/t00033/t00033.cc - using_namespace: - - clanguml::t00033 + - t00033.cc + using_namespace: clanguml::t00033 include: namespaces: - clanguml::t00033 diff --git a/tests/t00034/.clang-uml b/tests/t00034/.clang-uml index 62588ba7..39f5c3ec 100644 --- a/tests/t00034/.clang-uml +++ b/tests/t00034/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00034_class: type: class glob: - - tests/t00034/t00034.cc - using_namespace: - - clanguml::t00034 + - t00034.cc + using_namespace: clanguml::t00034 include: namespaces: - clanguml::t00034 diff --git a/tests/t00035/.clang-uml b/tests/t00035/.clang-uml index 300af744..01b766ee 100644 --- a/tests/t00035/.clang-uml +++ b/tests/t00035/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00035_class: type: class glob: - - tests/t00035/t00035.cc - using_namespace: - - clanguml::t00035 + - t00035.cc + using_namespace: clanguml::t00035 include: namespaces: - clanguml::t00035 diff --git a/tests/t00036/.clang-uml b/tests/t00036/.clang-uml index cbf3d637..1257d006 100644 --- a/tests/t00036/.clang-uml +++ b/tests/t00036/.clang-uml @@ -1,13 +1,10 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00036_class: type: class generate_packages: true glob: - - tests/t00036/t00036.cc - using_namespace: - - clanguml::t00036 + - t00036.cc + using_namespace: clanguml::t00036 include: namespaces: - clanguml::t00036 diff --git a/tests/t00037/.clang-uml b/tests/t00037/.clang-uml index 479778fc..6d5c6a5f 100644 --- a/tests/t00037/.clang-uml +++ b/tests/t00037/.clang-uml @@ -1,13 +1,10 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00037_class: type: class generate_packages: true glob: - - tests/t00037/t00037.cc - using_namespace: - - clanguml::t00037 + - t00037.cc + using_namespace: clanguml::t00037 include: namespaces: - clanguml::t00037 \ No newline at end of file diff --git a/tests/t00038/.clang-uml b/tests/t00038/.clang-uml index a762d0b4..77cf8e92 100644 --- a/tests/t00038/.clang-uml +++ b/tests/t00038/.clang-uml @@ -1,13 +1,10 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00038_class: type: class generate_packages: false glob: - - tests/t00038/t00038.cc - using_namespace: - - clanguml::t00038 + - t00038.cc + using_namespace: clanguml::t00038 include: namespaces: - clanguml::t00038 diff --git a/tests/t00039/.clang-uml b/tests/t00039/.clang-uml index ee841b25..d21a2bed 100644 --- a/tests/t00039/.clang-uml +++ b/tests/t00039/.clang-uml @@ -1,13 +1,10 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00039_class: type: class generate_packages: false glob: - - tests/t00039/t00039.cc - using_namespace: - - clanguml::t00039 + - t00039.cc + using_namespace: clanguml::t00039 include: subclasses: - clanguml::t00039::A diff --git a/tests/t00040/.clang-uml b/tests/t00040/.clang-uml index 966100e2..451c137e 100644 --- a/tests/t00040/.clang-uml +++ b/tests/t00040/.clang-uml @@ -1,13 +1,10 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00040_class: type: class generate_packages: false glob: - - tests/t00040/t00040.cc - using_namespace: - - clanguml::t00040 + - t00040.cc + using_namespace: clanguml::t00040 include: namespaces: - clanguml::t00040 diff --git a/tests/t00041/.clang-uml b/tests/t00041/.clang-uml index 96dc34ae..b9b0068d 100644 --- a/tests/t00041/.clang-uml +++ b/tests/t00041/.clang-uml @@ -1,13 +1,10 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00041_class: type: class generate_packages: false glob: - - tests/t00041/t00041.cc - using_namespace: - - clanguml::t00041 + - t00041.cc + using_namespace: clanguml::t00041 include: namespaces: - clanguml::t00041 diff --git a/tests/t00042/.clang-uml b/tests/t00042/.clang-uml index 671323f3..8b0ee5f2 100644 --- a/tests/t00042/.clang-uml +++ b/tests/t00042/.clang-uml @@ -1,13 +1,10 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00042_class: type: class generate_packages: false glob: - - tests/t00042/t00042.cc - using_namespace: - - clanguml::t00042 + - t00042.cc + using_namespace: clanguml::t00042 include: specializations: - clanguml::t00042::A diff --git a/tests/t00043/.clang-uml b/tests/t00043/.clang-uml index 59dc3a8b..ec5c5b5d 100644 --- a/tests/t00043/.clang-uml +++ b/tests/t00043/.clang-uml @@ -1,13 +1,10 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00043_class: type: class generate_packages: true glob: - - tests/t00043/t00043.cc - using_namespace: - - clanguml::t00043 + - t00043.cc + using_namespace: clanguml::t00043 include: dependants: - clanguml::t00043::dependants::A diff --git a/tests/t00044/.clang-uml b/tests/t00044/.clang-uml index b2fcd42d..3718fac5 100644 --- a/tests/t00044/.clang-uml +++ b/tests/t00044/.clang-uml @@ -1,13 +1,10 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00044_class: type: class generate_packages: true glob: - - tests/t00044/t00044.cc - using_namespace: - - clanguml::t00044 + - t00044.cc + using_namespace: clanguml::t00044 include: namespaces: - clanguml::t00044 \ No newline at end of file diff --git a/tests/t00045/.clang-uml b/tests/t00045/.clang-uml index f3190ddf..9593b383 100644 --- a/tests/t00045/.clang-uml +++ b/tests/t00045/.clang-uml @@ -1,10 +1,8 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00045_class: type: class glob: - - tests/t00045/t00045.cc + - t00045.cc exclude: namespaces: - std \ No newline at end of file diff --git a/tests/t00046/.clang-uml b/tests/t00046/.clang-uml index 4a836860..6ef415ea 100644 --- a/tests/t00046/.clang-uml +++ b/tests/t00046/.clang-uml @@ -1,11 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00046_class: type: class generate_packages: true glob: - - tests/t00046/t00046.cc + - t00046.cc exclude: namespaces: - std \ No newline at end of file diff --git a/tests/t00047/.clang-uml b/tests/t00047/.clang-uml index bb090e58..3dc96754 100644 --- a/tests/t00047/.clang-uml +++ b/tests/t00047/.clang-uml @@ -1,10 +1,8 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00047_class: type: class glob: - - tests/t00047/t00047.cc + - t00047.cc using_namespace: clanguml::t00047 include: namespaces: diff --git a/tests/t00048/.clang-uml b/tests/t00048/.clang-uml index 5e2868eb..e6b074f8 100644 --- a/tests/t00048/.clang-uml +++ b/tests/t00048/.clang-uml @@ -1,12 +1,10 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00048_class: type: class glob: - - tests/t00048/b_t00048.cc - - tests/t00048/a_t00048.cc - - tests/t00048/t00048.cc + - b_t00048.cc + - a_t00048.cc + - t00048.cc using_namespace: clanguml::t00048 include: namespaces: diff --git a/tests/t00049/.clang-uml b/tests/t00049/.clang-uml index 08987f31..7d7cadb4 100644 --- a/tests/t00049/.clang-uml +++ b/tests/t00049/.clang-uml @@ -1,5 +1,3 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00049_class: type: class @@ -11,7 +9,7 @@ diagrams: "std::vector": string_vector "std::map": intmap glob: - - tests/t00049/t00049.cc + - t00049.cc include: namespaces: - clanguml::t00049 \ No newline at end of file diff --git a/tests/t00050/.clang-uml b/tests/t00050/.clang-uml index 31d649e8..98bdad84 100644 --- a/tests/t00050/.clang-uml +++ b/tests/t00050/.clang-uml @@ -1,10 +1,8 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00050_class: type: class glob: - - tests/t00050/t00050.cc + - t00050.cc comment_parser: clang include: namespaces: diff --git a/tests/t00051/.clang-uml b/tests/t00051/.clang-uml index c8084955..af93cb29 100644 --- a/tests/t00051/.clang-uml +++ b/tests/t00051/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00051_class: type: class glob: - - tests/t00051/t00051.cc + - t00051.cc include: namespaces: - clanguml::t00051 - using_namespace: - - clanguml::t00051 \ No newline at end of file + using_namespace: clanguml::t00051 \ No newline at end of file diff --git a/tests/t00051/test_case.h b/tests/t00051/test_case.h index 73685a04..ed64654b 100644 --- a/tests/t00051/test_case.h +++ b/tests/t00051/test_case.h @@ -44,15 +44,14 @@ TEST_CASE("t00051", "[test-case][class]") (IsMethod("custom_thread1", "void", "Function && f, Args &&... args"))); REQUIRE_THAT(src, - (IsMethod("thread", "void", - "(lambda at tests/t00051/t00051.cc:59:27) &&"))); + (IsMethod( + "thread", "void", "(lambda at t00051.cc:59:27) &&"))); REQUIRE_THAT(src, (IsMethod("start_thread3", - "B<(lambda at tests/t00051/t00051.cc:43:18),(lambda at " - "tests/t00051/t00051.cc:43:27)>"))); + "B<(lambda at t00051.cc:43:18),(lambda at " + "t00051.cc:43:27)>"))); REQUIRE_THAT(src, - (IsMethod( - "get_function", "(lambda at tests/t00051/t00051.cc:48:16)"))); + (IsMethod("get_function", "(lambda at t00051.cc:48:16)"))); REQUIRE_THAT(src, IsClassTemplate("B", "F,FF=F")); REQUIRE_THAT(src, (IsMethod("f", "void"))); @@ -60,18 +59,17 @@ TEST_CASE("t00051", "[test-case][class]") REQUIRE_THAT(src, IsClassTemplate("B", - "(lambda at tests/t00051/t00051.cc:43:18),(lambda at " - "tests/t00051/t00051.cc:43:27)")); + "(lambda at t00051.cc:43:18),(lambda at t00051.cc:43:27)")); REQUIRE_THAT(src, IsInstantiation(_A("B"), - _A("B<(lambda at tests/t00051/t00051.cc:43:18),(lambda " - "at tests/t00051/t00051.cc:43:27)>"))); + _A("B<(lambda at t00051.cc:43:18),(lambda at " + "t00051.cc:43:27)>"))); REQUIRE_THAT(src, IsDependency(_A("A"), - _A("B<(lambda at tests/t00051/t00051.cc:43:18),(lambda " - "at tests/t00051/t00051.cc:43:27)>"))); + _A("B<(lambda at t00051.cc:43:18),(lambda " + "at t00051.cc:43:27)>"))); save_puml(config.output_directory(), diagram->name + ".puml", src); } @@ -102,33 +100,31 @@ TEST_CASE("t00051", "[test-case][class]") (IsMethod("custom_thread1", "void", "Function && f, Args &&... args"))); REQUIRE_THAT(src, - (IsMethod("thread", "void", - "(lambda at tests/t00051/t00051.cc:59:27) &&"))); + (IsMethod( + "thread", "void", "(lambda at t00051.cc:59:27) &&"))); REQUIRE_THAT(src, (IsMethod("start_thread3", - "B<(lambda at tests/t00051/t00051.cc:43:18),(lambda at " - "tests/t00051/t00051.cc:43:27)>"))); + "B<(lambda at t00051.cc:43:18),(lambda at t00051.cc:43:27)>"))); REQUIRE_THAT(src, - (IsMethod( - "get_function", "(lambda at tests/t00051/t00051.cc:48:16)"))); + (IsMethod("get_function", "(lambda at t00051.cc:48:16)"))); REQUIRE_THAT(src, IsClass(_A("B"))); REQUIRE_THAT(src, (IsMethod("f", "void"))); REQUIRE_THAT(src, (IsMethod("ff", "void"))); REQUIRE_THAT(src, - IsClass(_A("B<(lambda at tests/t00051/t00051.cc:43:18),(lambda at " - "tests/t00051/t00051.cc:43:27)>"))); + IsClass(_A("B<(lambda at t00051.cc:43:18),(lambda at " + "t00051.cc:43:27)>"))); REQUIRE_THAT(src, IsInstantiation(_A("B"), - _A("B<(lambda at tests/t00051/t00051.cc:43:18),(lambda " - "at tests/t00051/t00051.cc:43:27)>"))); + _A("B<(lambda at t00051.cc:43:18),(lambda at " + "t00051.cc:43:27)>"))); REQUIRE_THAT(src, IsDependency(_A("A"), - _A("B<(lambda at tests/t00051/t00051.cc:43:18),(lambda " - "at tests/t00051/t00051.cc:43:27)>"))); + _A("B<(lambda at t00051.cc:43:18),(lambda " + "at t00051.cc:43:27)>"))); save_mermaid(config.output_directory(), diagram->name + ".mmd", src); } diff --git a/tests/t00052/.clang-uml b/tests/t00052/.clang-uml index b6a64218..5dabf109 100644 --- a/tests/t00052/.clang-uml +++ b/tests/t00052/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00052_class: type: class glob: - - tests/t00052/t00052.cc + - t00052.cc include: namespaces: - clanguml::t00052 - using_namespace: - - clanguml::t00052 \ No newline at end of file + using_namespace: clanguml::t00052 \ No newline at end of file diff --git a/tests/t00053/.clang-uml b/tests/t00053/.clang-uml index 42a2c1e3..283cbf3d 100644 --- a/tests/t00053/.clang-uml +++ b/tests/t00053/.clang-uml @@ -1,15 +1,12 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00053_class: type: class glob: - - tests/t00053/t00053.cc + - t00053.cc include: namespaces: - clanguml::t00053 - using_namespace: - - clanguml::t00053 + using_namespace: clanguml::t00053 layout: a: - together: [c,e,f] diff --git a/tests/t00054/.clang-uml b/tests/t00054/.clang-uml index 74b9346c..474c2613 100644 --- a/tests/t00054/.clang-uml +++ b/tests/t00054/.clang-uml @@ -1,15 +1,12 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00054_class: type: class glob: - - tests/t00054/t00054.cc + - t00054.cc include: namespaces: - clanguml::t00054 - using_namespace: - - clanguml::t00054 + using_namespace: clanguml::t00054 generate_packages: true layout: a: diff --git a/tests/t00055/.clang-uml b/tests/t00055/.clang-uml index def3b164..5839af28 100644 --- a/tests/t00055/.clang-uml +++ b/tests/t00055/.clang-uml @@ -1,15 +1,12 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00055_class: type: class glob: - - tests/t00055/t00055.cc + - t00055.cc include: namespaces: - clanguml::t00055 - using_namespace: - - clanguml::t00055 + using_namespace: clanguml::t00055 layout: A: - row: [C, E, G, I] diff --git a/tests/t00056/.clang-uml b/tests/t00056/.clang-uml index d3248dd9..17df8220 100644 --- a/tests/t00056/.clang-uml +++ b/tests/t00056/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00056_class: type: class glob: - - tests/t00056/t00056.cc + - t00056.cc include: namespaces: - clanguml::t00056 - using_namespace: - - clanguml::t00056 \ No newline at end of file + using_namespace: clanguml::t00056 \ No newline at end of file diff --git a/tests/t00057/.clang-uml b/tests/t00057/.clang-uml index e6e9f236..bff63d06 100644 --- a/tests/t00057/.clang-uml +++ b/tests/t00057/.clang-uml @@ -1,8 +1,6 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00057_class: type: class glob: - - tests/t00057/t00057.c - - tests/t00057/src/t00057_impl.c \ No newline at end of file + - t00057.c + - src/t00057_impl.c \ No newline at end of file diff --git a/tests/t00058/.clang-uml b/tests/t00058/.clang-uml index f723261d..a49be4ca 100644 --- a/tests/t00058/.clang-uml +++ b/tests/t00058/.clang-uml @@ -1,15 +1,12 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00058_class: type: class glob: - - tests/t00058/t00058.cc + - t00058.cc include: namespaces: - clanguml::t00058 - using_namespace: - - clanguml::t00058 + using_namespace: clanguml::t00058 plantuml: after: - '{{ alias("same_as_first_type") }} ..> {{ alias("first_type") }}' \ No newline at end of file diff --git a/tests/t00059/.clang-uml b/tests/t00059/.clang-uml index 945433ad..1d394b92 100644 --- a/tests/t00059/.clang-uml +++ b/tests/t00059/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00059_class: type: class glob: - - tests/t00059/t00059.cc + - t00059.cc include: namespaces: - clanguml::t00059 - using_namespace: - - clanguml::t00059 \ No newline at end of file + using_namespace: clanguml::t00059 \ No newline at end of file diff --git a/tests/t00060/.clang-uml b/tests/t00060/.clang-uml index bd6de4cc..e960adf0 100644 --- a/tests/t00060/.clang-uml +++ b/tests/t00060/.clang-uml @@ -1,15 +1,12 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00060_class: type: class glob: - - tests/t00060/t00060.cc + - t00060.cc include: namespaces: - clanguml::t00060 parents: - clanguml::t00060::D - clanguml::t00060::H - using_namespace: - - clanguml::t00060 \ No newline at end of file + using_namespace: clanguml::t00060 \ No newline at end of file diff --git a/tests/t00061/.clang-uml b/tests/t00061/.clang-uml index 7746905a..acb8837c 100644 --- a/tests/t00061/.clang-uml +++ b/tests/t00061/.clang-uml @@ -1,9 +1,6 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00061_class: type: class - relative_to: ../../../tests/t00061 glob: - t00061.cc include: @@ -11,5 +8,4 @@ diagrams: - clanguml::t00061 paths: - include/*_a.h - using_namespace: - - clanguml::t00061 \ No newline at end of file + using_namespace: clanguml::t00061 \ No newline at end of file diff --git a/tests/t00062/.clang-uml b/tests/t00062/.clang-uml index 1a0ab2d6..7ffb92a3 100644 --- a/tests/t00062/.clang-uml +++ b/tests/t00062/.clang-uml @@ -1,15 +1,12 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00062_class: type: class glob: - - tests/t00062/t00062.cc + - t00062.cc include: namespaces: - clanguml::t00062 - using_namespace: - - clanguml::t00062 + using_namespace: clanguml::t00062 plantuml: before: - left to right direction \ No newline at end of file diff --git a/tests/t00063/.clang-uml b/tests/t00063/.clang-uml index 13ddeb16..8bd31c86 100644 --- a/tests/t00063/.clang-uml +++ b/tests/t00063/.clang-uml @@ -1,15 +1,12 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00063_class: type: class glob: - - tests/t00063/t00063.cc + - t00063.cc include: namespaces: - clanguml::t00063 exclude: element_types: - enum - using_namespace: - - clanguml::t00063 \ No newline at end of file + using_namespace: clanguml::t00063 \ No newline at end of file diff --git a/tests/t00064/.clang-uml b/tests/t00064/.clang-uml index 0a76352a..535ffb5c 100644 --- a/tests/t00064/.clang-uml +++ b/tests/t00064/.clang-uml @@ -1,15 +1,12 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00064_class: type: class glob: - - tests/t00064/t00064.cc + - t00064.cc include: namespaces: - clanguml::t00064 - using_namespace: - - clanguml::t00064 + using_namespace: clanguml::t00064 plantuml: before: - left to right direction \ No newline at end of file diff --git a/tests/t00065/.clang-uml b/tests/t00065/.clang-uml index f77d743c..bc17a128 100644 --- a/tests/t00065/.clang-uml +++ b/tests/t00065/.clang-uml @@ -1,15 +1,11 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00065_class: type: class glob: - t00065.cc - relative_to: ../../../tests/t00065 generate_packages: true package_type: directory include: namespaces: - clanguml::t00065 - using_namespace: - - clanguml::t00065 \ No newline at end of file + using_namespace: clanguml::t00065 \ No newline at end of file diff --git a/tests/t00066/.clang-uml b/tests/t00066/.clang-uml index 9c32c193..9618b7ab 100644 --- a/tests/t00066/.clang-uml +++ b/tests/t00066/.clang-uml @@ -1,14 +1,11 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00066_class: type: class glob: - - tests/t00066/t00066.cc + - t00066.cc include: namespaces: - clanguml::t00066 member_order: as_is group_methods: false - using_namespace: - - clanguml::t00066 \ No newline at end of file + using_namespace: clanguml::t00066 \ No newline at end of file diff --git a/tests/t00067/.clang-uml b/tests/t00067/.clang-uml index 9c15ab95..373e2d8d 100644 --- a/tests/t00067/.clang-uml +++ b/tests/t00067/.clang-uml @@ -1,10 +1,8 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00067_class: type: class glob: - - tests/t00067/t00067.cc + - t00067.cc include: namespaces: - clanguml::t00067 @@ -15,5 +13,4 @@ diagrams: - operator - assignment - static - using_namespace: - - clanguml::t00067 \ No newline at end of file + using_namespace: clanguml::t00067 \ No newline at end of file diff --git a/tests/t00068/.clang-uml b/tests/t00068/.clang-uml index e0fe8c16..fc07042a 100644 --- a/tests/t00068/.clang-uml +++ b/tests/t00068/.clang-uml @@ -1,11 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t00068_r0_class: type: class title: AAA context of radius 0 glob: - - tests/t00068/t00068.cc + - t00068.cc include: namespaces: - clanguml::t00068 @@ -13,13 +11,12 @@ diagrams: - match: radius: 0 pattern: clanguml::t00068::AAA - using_namespace: - - clanguml::t00068 + using_namespace: clanguml::t00068 t00068_r1_class: type: class title: AAA context of radius 1 glob: - - tests/t00068/t00068.cc + - t00068.cc include: namespaces: - clanguml::t00068 @@ -27,13 +24,12 @@ diagrams: - match: radius: 1 pattern: clanguml::t00068::AAA - using_namespace: - - clanguml::t00068 + using_namespace: clanguml::t00068 t00068_r2_class: type: class title: AAA context of radius 2 glob: - - tests/t00068/t00068.cc + - t00068.cc include: namespaces: - clanguml::t00068 @@ -41,5 +37,4 @@ diagrams: - match: radius: 2 pattern: clanguml::t00068::AAA - using_namespace: - - clanguml::t00068 \ No newline at end of file + using_namespace: clanguml::t00068 \ No newline at end of file diff --git a/tests/t20001/.clang-uml b/tests/t20001/.clang-uml index 71cc0776..078067e9 100644 --- a/tests/t20001/.clang-uml +++ b/tests/t20001/.clang-uml @@ -1,5 +1,3 @@ -compilation_database_dir: .. -output_directory: diagrams add_compile_flags: - -fparse-all-comments diagrams: @@ -7,15 +5,14 @@ diagrams: type: sequence title: Basic sequence diagram example glob: - - tests/t20001/t20001.cc + - t20001.cc include: namespaces: - clanguml::t20001 exclude: namespaces: - clanguml::t20001::detail - using_namespace: - - clanguml::t20001 + using_namespace: clanguml::t20001 from: - function: "clanguml::t20001::tmain()" plantuml: diff --git a/tests/t20002/.clang-uml b/tests/t20002/.clang-uml index f66173bb..5c3b2f31 100644 --- a/tests/t20002/.clang-uml +++ b/tests/t20002/.clang-uml @@ -1,14 +1,11 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20002_sequence: type: sequence glob: - - tests/t20002/t20002.cc + - t20002.cc include: namespaces: - clanguml::t20002 - using_namespace: - - clanguml::t20002 + using_namespace: clanguml::t20002 from: - function: "clanguml::t20002::m1()" diff --git a/tests/t20003/.clang-uml b/tests/t20003/.clang-uml index c2999319..7fff1b46 100644 --- a/tests/t20003/.clang-uml +++ b/tests/t20003/.clang-uml @@ -1,14 +1,11 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20003_sequence: type: sequence glob: - - tests/t20003/t20003.cc + - t20003.cc include: namespaces: - clanguml::t20003 - using_namespace: - - clanguml::t20003 + using_namespace: clanguml::t20003 from: - function: "clanguml::t20003::m1(T)" diff --git a/tests/t20004/.clang-uml b/tests/t20004/.clang-uml index 8390da4e..cac2a896 100644 --- a/tests/t20004/.clang-uml +++ b/tests/t20004/.clang-uml @@ -1,14 +1,11 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20004_sequence: type: sequence glob: - - tests/t20004/t20004.cc + - t20004.cc include: namespaces: - clanguml::t20004 - using_namespace: - - clanguml::t20004 + using_namespace: clanguml::t20004 from: - function: "clanguml::t20004::main()" \ No newline at end of file diff --git a/tests/t20005/.clang-uml b/tests/t20005/.clang-uml index f5767bdd..58e3323f 100644 --- a/tests/t20005/.clang-uml +++ b/tests/t20005/.clang-uml @@ -1,14 +1,11 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20005_sequence: type: sequence glob: - - tests/t20005/t20005.cc + - t20005.cc include: namespaces: - clanguml::t20005 - using_namespace: - - clanguml::t20005 + using_namespace: clanguml::t20005 from: - function: "clanguml::t20005::C::c(T)" \ No newline at end of file diff --git a/tests/t20006/.clang-uml b/tests/t20006/.clang-uml index a10bc370..3e68fe1c 100644 --- a/tests/t20006/.clang-uml +++ b/tests/t20006/.clang-uml @@ -1,14 +1,11 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20006_sequence: type: sequence glob: - - tests/t20006/t20006.cc + - t20006.cc include: namespaces: - clanguml::t20006 - using_namespace: - - clanguml::t20006 + using_namespace: clanguml::t20006 from: - function: "clanguml::t20006::tmain()" \ No newline at end of file diff --git a/tests/t20007/.clang-uml b/tests/t20007/.clang-uml index 69332706..6f006772 100644 --- a/tests/t20007/.clang-uml +++ b/tests/t20007/.clang-uml @@ -1,14 +1,11 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20007_sequence: type: sequence glob: - - tests/t20007/t20007.cc + - t20007.cc include: namespaces: - clanguml::t20007 - using_namespace: - - clanguml::t20007 + using_namespace: clanguml::t20007 from: - function: "clanguml::t20007::tmain()" \ No newline at end of file diff --git a/tests/t20008/.clang-uml b/tests/t20008/.clang-uml index 8ae97a37..7b62145e 100644 --- a/tests/t20008/.clang-uml +++ b/tests/t20008/.clang-uml @@ -1,14 +1,11 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20008_sequence: type: sequence glob: - - tests/t20008/t20008.cc + - t20008.cc include: namespaces: - clanguml::t20008 - using_namespace: - - clanguml::t20008 + using_namespace: clanguml::t20008 from: - function: "clanguml::t20008::tmain()" \ No newline at end of file diff --git a/tests/t20009/.clang-uml b/tests/t20009/.clang-uml index f807e809..de566381 100644 --- a/tests/t20009/.clang-uml +++ b/tests/t20009/.clang-uml @@ -1,14 +1,11 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20009_sequence: type: sequence glob: - - tests/t20009/t20009.cc + - t20009.cc include: namespaces: - clanguml::t20009 - using_namespace: - - clanguml::t20009 + using_namespace: clanguml::t20009 from: - function: "clanguml::t20009::tmain()" \ No newline at end of file diff --git a/tests/t20010/.clang-uml b/tests/t20010/.clang-uml index a56f2a5d..0bf70c02 100644 --- a/tests/t20010/.clang-uml +++ b/tests/t20010/.clang-uml @@ -1,14 +1,11 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20010_sequence: type: sequence glob: - - tests/t20010/t20010.cc + - t20010.cc include: namespaces: - clanguml::t20010 - using_namespace: - - clanguml::t20010 + using_namespace: clanguml::t20010 from: - function: "clanguml::t20010::tmain()" \ No newline at end of file diff --git a/tests/t20011/.clang-uml b/tests/t20011/.clang-uml index 3ede9df0..968a7981 100644 --- a/tests/t20011/.clang-uml +++ b/tests/t20011/.clang-uml @@ -1,14 +1,11 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20011_sequence: type: sequence glob: - - tests/t20011/t20011.cc + - t20011.cc include: namespaces: - clanguml::t20011 - using_namespace: - - clanguml::t20011 + using_namespace: clanguml::t20011 from: - function: "clanguml::t20011::tmain()" \ No newline at end of file diff --git a/tests/t20012/.clang-uml b/tests/t20012/.clang-uml index 6d31f7df..7746ffc2 100644 --- a/tests/t20012/.clang-uml +++ b/tests/t20012/.clang-uml @@ -1,14 +1,11 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20012_sequence: type: sequence glob: - - tests/t20012/t20012.cc + - t20012.cc include: namespaces: - clanguml::t20012 - using_namespace: - - clanguml::t20012 + using_namespace: clanguml::t20012 from: - function: "clanguml::t20012::tmain()" \ No newline at end of file diff --git a/tests/t20012/test_case.h b/tests/t20012/test_case.h index 5d51b952..1212189a 100644 --- a/tests/t20012/test_case.h +++ b/tests/t20012/test_case.h @@ -1,5 +1,5 @@ /** - * tests/t20012/test_case.h + * test_case.h * * Copyright (c) 2021-2023 Bartek Kryza * @@ -36,43 +36,35 @@ TEST_CASE("t20012", "[test-case][sequence]") // Check if all calls exist REQUIRE_THAT(src, - HasCall(_A("tmain()"), - _A("tmain()::(lambda tests/t20012/t20012.cc:67:20)"), + HasCall(_A("tmain()"), _A("tmain()::(lambda t20012.cc:67:20)"), "operator()()")); REQUIRE_THAT(src, - HasCall(_A("tmain()::(lambda tests/t20012/t20012.cc:67:20)"), - _A("A"), "a()")); + HasCall(_A("tmain()::(lambda t20012.cc:67:20)"), _A("A"), "a()")); REQUIRE_THAT(src, HasCall(_A("A"), _A("A"), "aa()")); REQUIRE_THAT(src, HasCall(_A("A"), _A("A"), "aaa()")); REQUIRE_THAT(src, - HasCall(_A("tmain()::(lambda tests/t20012/t20012.cc:67:20)"), - _A("B"), "b()")); + HasCall(_A("tmain()::(lambda t20012.cc:67:20)"), _A("B"), "b()")); REQUIRE_THAT(src, HasCall(_A("B"), _A("B"), "bb()")); REQUIRE_THAT(src, HasCall(_A("B"), _A("B"), "bbb()")); REQUIRE_THAT(src, - HasCall(_A("tmain()::(lambda tests/t20012/t20012.cc:80:20)"), - _A("C"), "c()")); + HasCall(_A("tmain()::(lambda t20012.cc:80:20)"), _A("C"), "c()")); REQUIRE_THAT(src, HasCall(_A("C"), _A("C"), "cc()")); REQUIRE_THAT(src, HasCall(_A("C"), _A("C"), "ccc()")); REQUIRE_THAT(src, - HasCall(_A("tmain()::(lambda tests/t20012/t20012.cc:80:20)"), - _A("tmain()::(lambda tests/t20012/t20012.cc:67:20)"), - "operator()()")); + HasCall(_A("tmain()::(lambda t20012.cc:80:20)"), + _A("tmain()::(lambda t20012.cc:67:20)"), "operator()()")); REQUIRE_THAT(src, HasCall(_A("C"), _A("C"), "ccc()")); REQUIRE_THAT(src, - HasCall(_A("tmain()"), - _A("R"), "r()")); + HasCall(_A("tmain()"), _A("R"), "r()")); REQUIRE_THAT(src, - HasCall(_A("R"), - _A("tmain()::(lambda tests/t20012/t20012.cc:86:9)"), - "operator()()")); + HasCall(_A("R"), + _A("tmain()::(lambda t20012.cc:86:9)"), "operator()()")); REQUIRE_THAT(src, - HasCall(_A("tmain()::(lambda tests/t20012/t20012.cc:86:9)"), - _A("C"), "c()")); + HasCall(_A("tmain()::(lambda t20012.cc:86:9)"), _A("C"), "c()")); // @todo #168 // REQUIRE_THAT(puml, HasCall(_A("tmain()"), _A("D"), "add5(int)")); @@ -86,28 +78,20 @@ TEST_CASE("t20012", "[test-case][sequence]") using namespace json; std::vector messages = { - FindMessage(j, "tmain()", - "tmain()::(lambda tests/t20012/t20012.cc:67:20)", + FindMessage(j, "tmain()", "tmain()::(lambda t20012.cc:67:20)", "operator()()"), - FindMessage(j, "tmain()::(lambda tests/t20012/t20012.cc:67:20)", - "A", "a()"), + FindMessage(j, "tmain()::(lambda t20012.cc:67:20)", "A", "a()"), FindMessage(j, "A", "A", "aa()"), FindMessage(j, "A", "A", "aaa()"), - FindMessage(j, "tmain()::(lambda tests/t20012/t20012.cc:67:20)", - "B", "b()"), + FindMessage(j, "tmain()::(lambda t20012.cc:67:20)", "B", "b()"), FindMessage(j, "B", "B", "bb()"), FindMessage(j, "B", "B", "bbb()"), - FindMessage(j, "tmain()::(lambda tests/t20012/t20012.cc:80:20)", - "C", "c()"), + FindMessage(j, "tmain()::(lambda t20012.cc:80:20)", "C", "c()"), FindMessage(j, "C", "C", "cc()"), FindMessage(j, "C", "C", "ccc()"), - FindMessage(j, "tmain()::(lambda tests/t20012/t20012.cc:80:20)", - "tmain()::(lambda tests/t20012/t20012.cc:67:20)", - "operator()()"), - FindMessage(j, "tmain()", - "R", "r()"), - FindMessage(j, "R", - "tmain()::(lambda tests/t20012/t20012.cc:86:9)", - "operator()()"), - FindMessage( - j, "tmain()::(lambda tests/t20012/t20012.cc:86:9)", "C", "c()"), + FindMessage(j, "tmain()::(lambda t20012.cc:80:20)", + "tmain()::(lambda t20012.cc:67:20)", "operator()()"), + FindMessage(j, "tmain()", "R", "r()"), + FindMessage(j, "R", + "tmain()::(lambda t20012.cc:86:9)", "operator()()"), + FindMessage(j, "tmain()::(lambda t20012.cc:86:9)", "C", "c()"), // @todo #168 // FindMessage(j, "tmain()", "D", "add5(int)") }; @@ -124,43 +108,35 @@ TEST_CASE("t20012", "[test-case][sequence]") using mermaid::HasCall; REQUIRE_THAT(src, - HasCall(_A("tmain()"), - _A("tmain()::(lambda tests/t20012/t20012.cc:67:20)"), + HasCall(_A("tmain()"), _A("tmain()::(lambda t20012.cc:67:20)"), "operator()()")); REQUIRE_THAT(src, - HasCall(_A("tmain()::(lambda tests/t20012/t20012.cc:67:20)"), - _A("A"), "a()")); + HasCall(_A("tmain()::(lambda t20012.cc:67:20)"), _A("A"), "a()")); REQUIRE_THAT(src, HasCall(_A("A"), _A("A"), "aa()")); REQUIRE_THAT(src, HasCall(_A("A"), _A("A"), "aaa()")); REQUIRE_THAT(src, - HasCall(_A("tmain()::(lambda tests/t20012/t20012.cc:67:20)"), - _A("B"), "b()")); + HasCall(_A("tmain()::(lambda t20012.cc:67:20)"), _A("B"), "b()")); REQUIRE_THAT(src, HasCall(_A("B"), _A("B"), "bb()")); REQUIRE_THAT(src, HasCall(_A("B"), _A("B"), "bbb()")); REQUIRE_THAT(src, - HasCall(_A("tmain()::(lambda tests/t20012/t20012.cc:80:20)"), - _A("C"), "c()")); + HasCall(_A("tmain()::(lambda t20012.cc:80:20)"), _A("C"), "c()")); REQUIRE_THAT(src, HasCall(_A("C"), _A("C"), "cc()")); REQUIRE_THAT(src, HasCall(_A("C"), _A("C"), "ccc()")); REQUIRE_THAT(src, - HasCall(_A("tmain()::(lambda tests/t20012/t20012.cc:80:20)"), - _A("tmain()::(lambda tests/t20012/t20012.cc:67:20)"), - "operator()()")); + HasCall(_A("tmain()::(lambda t20012.cc:80:20)"), + _A("tmain()::(lambda t20012.cc:67:20)"), "operator()()")); REQUIRE_THAT(src, HasCall(_A("C"), _A("C"), "ccc()")); REQUIRE_THAT(src, - HasCall(_A("tmain()"), - _A("R"), "r()")); + HasCall(_A("tmain()"), _A("R"), "r()")); REQUIRE_THAT(src, - HasCall(_A("R"), - _A("tmain()::(lambda tests/t20012/t20012.cc:86:9)"), - "operator()()")); + HasCall(_A("R"), + _A("tmain()::(lambda t20012.cc:86:9)"), "operator()()")); REQUIRE_THAT(src, - HasCall(_A("tmain()::(lambda tests/t20012/t20012.cc:86:9)"), - _A("C"), "c()")); + HasCall(_A("tmain()::(lambda t20012.cc:86:9)"), _A("C"), "c()")); save_mermaid(config.output_directory(), diagram->name + ".mmd", src); } diff --git a/tests/t20013/.clang-uml b/tests/t20013/.clang-uml index 5696f7b1..da8b5286 100644 --- a/tests/t20013/.clang-uml +++ b/tests/t20013/.clang-uml @@ -1,14 +1,11 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20013_sequence: type: sequence glob: - - tests/t20013/t20013.cc + - t20013.cc include: namespaces: - clanguml::t20013 - using_namespace: - - clanguml::t20013 + using_namespace: clanguml::t20013 from: - function: "clanguml::t20013::tmain(int,char **)" \ No newline at end of file diff --git a/tests/t20014/.clang-uml b/tests/t20014/.clang-uml index 8de177d0..bc334553 100644 --- a/tests/t20014/.clang-uml +++ b/tests/t20014/.clang-uml @@ -1,17 +1,14 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20014_sequence: type: sequence glob: - - tests/t20014/t20014.cc - - tests/t20014/t20014_c.cc - - tests/t20014/t20014_b.cc - - tests/t20014/t20014_a.cc + - t20014.cc + - t20014_c.cc + - t20014_b.cc + - t20014_a.cc include: namespaces: - clanguml::t20014 - using_namespace: - - clanguml::t20014 + using_namespace: clanguml::t20014 from: - function: "clanguml::t20014::tmain()" \ No newline at end of file diff --git a/tests/t20015/.clang-uml b/tests/t20015/.clang-uml index 4c928590..9e7e12b5 100644 --- a/tests/t20015/.clang-uml +++ b/tests/t20015/.clang-uml @@ -1,17 +1,14 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20015_sequence: type: sequence glob: - - tests/t20015/t20015.cc + - t20015.cc include: namespaces: - clanguml::t20015 exclude: namespaces: - clanguml::t20015::detail - using_namespace: - - clanguml::t20015 + using_namespace: clanguml::t20015 from: - function: "clanguml::t20015::tmain()" \ No newline at end of file diff --git a/tests/t20016/.clang-uml b/tests/t20016/.clang-uml index d9df2ee8..f2a8a3a7 100644 --- a/tests/t20016/.clang-uml +++ b/tests/t20016/.clang-uml @@ -1,14 +1,11 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20016_sequence: type: sequence glob: - - tests/t20016/t20016.cc + - t20016.cc include: namespaces: - clanguml::t20016 - using_namespace: - - clanguml::t20016 + using_namespace: clanguml::t20016 from: - function: "clanguml::t20016::tmain()" \ No newline at end of file diff --git a/tests/t20017/.clang-uml b/tests/t20017/.clang-uml index 30a4154d..da0e2823 100644 --- a/tests/t20017/.clang-uml +++ b/tests/t20017/.clang-uml @@ -1,10 +1,7 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20017_sequence: type: sequence combine_free_functions_into_file_participants: true - relative_to: ../../../tests/t20017 glob: - t20017.cc include: diff --git a/tests/t20018/.clang-uml b/tests/t20018/.clang-uml index ca5fd24b..4af398f5 100644 --- a/tests/t20018/.clang-uml +++ b/tests/t20018/.clang-uml @@ -1,14 +1,11 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20018_sequence: type: sequence glob: - - tests/t20018/t20018.cc + - t20018.cc include: namespaces: - clanguml::t20018 - using_namespace: - - clanguml::t20018 + using_namespace: clanguml::t20018 from: - function: "clanguml::t20018::tmain()" \ No newline at end of file diff --git a/tests/t20019/.clang-uml b/tests/t20019/.clang-uml index e45dae93..84c3a206 100644 --- a/tests/t20019/.clang-uml +++ b/tests/t20019/.clang-uml @@ -1,14 +1,11 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20019_sequence: type: sequence glob: - - tests/t20019/t20019.cc + - t20019.cc include: namespaces: - clanguml::t20019 - using_namespace: - - clanguml::t20019 + using_namespace: clanguml::t20019 from: - function: "clanguml::t20019::tmain()" \ No newline at end of file diff --git a/tests/t20020/.clang-uml b/tests/t20020/.clang-uml index cd97df03..bfcc1663 100644 --- a/tests/t20020/.clang-uml +++ b/tests/t20020/.clang-uml @@ -1,14 +1,11 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20020_sequence: type: sequence glob: - - tests/t20020/t20020.cc + - t20020.cc include: namespaces: - clanguml::t20020 - using_namespace: - - clanguml::t20020 + using_namespace: clanguml::t20020 from: - function: "clanguml::t20020::tmain()" \ No newline at end of file diff --git a/tests/t20021/.clang-uml b/tests/t20021/.clang-uml index 4df4d4b2..3fc40d99 100644 --- a/tests/t20021/.clang-uml +++ b/tests/t20021/.clang-uml @@ -1,14 +1,11 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20021_sequence: type: sequence glob: - - tests/t20021/t20021.cc + - t20021.cc include: namespaces: - clanguml::t20021 - using_namespace: - - clanguml::t20021 + using_namespace: clanguml::t20021 from: - function: "clanguml::t20021::tmain()" \ No newline at end of file diff --git a/tests/t20022/.clang-uml b/tests/t20022/.clang-uml index 48ccf51d..a2231a45 100644 --- a/tests/t20022/.clang-uml +++ b/tests/t20022/.clang-uml @@ -1,14 +1,11 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20022_sequence: type: sequence glob: - - tests/t20022/t20022.cc + - t20022.cc include: namespaces: - clanguml::t20022 - using_namespace: - - clanguml::t20022 + using_namespace: clanguml::t20022 from: - function: "clanguml::t20022::tmain()" \ No newline at end of file diff --git a/tests/t20023/.clang-uml b/tests/t20023/.clang-uml index 0e1c7079..12759641 100644 --- a/tests/t20023/.clang-uml +++ b/tests/t20023/.clang-uml @@ -1,14 +1,11 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20023_sequence: type: sequence glob: - - tests/t20023/t20023.cc + - t20023.cc include: namespaces: - clanguml::t20023 - using_namespace: - - clanguml::t20023 + using_namespace: clanguml::t20023 start_from: - function: "clanguml::t20023::tmain()" \ No newline at end of file diff --git a/tests/t20024/.clang-uml b/tests/t20024/.clang-uml index a93e71f5..608ac861 100644 --- a/tests/t20024/.clang-uml +++ b/tests/t20024/.clang-uml @@ -1,14 +1,11 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20024_sequence: type: sequence glob: - - tests/t20024/t20024.cc + - t20024.cc include: namespaces: - clanguml::t20024 - using_namespace: - - clanguml::t20024 + using_namespace: clanguml::t20024 from: - function: "clanguml::t20024::tmain()" \ No newline at end of file diff --git a/tests/t20025/.clang-uml b/tests/t20025/.clang-uml index 8c027694..7ba600b5 100644 --- a/tests/t20025/.clang-uml +++ b/tests/t20025/.clang-uml @@ -1,14 +1,11 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20025_sequence: type: sequence glob: - - tests/t20025/t20025.cc + - t20025.cc include: namespaces: - clanguml::t20025 - using_namespace: - - clanguml::t20025 + using_namespace: clanguml::t20025 from: - function: "clanguml::t20025::tmain()" \ No newline at end of file diff --git a/tests/t20026/.clang-uml b/tests/t20026/.clang-uml index ee37b674..416400d8 100644 --- a/tests/t20026/.clang-uml +++ b/tests/t20026/.clang-uml @@ -1,14 +1,11 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20026_sequence: type: sequence glob: - - tests/t20026/t20026.cc + - t20026.cc include: namespaces: - clanguml::t20026 - using_namespace: - - clanguml::t20026 + using_namespace: clanguml::t20026 from: - function: "clanguml::t20026::tmain()" \ No newline at end of file diff --git a/tests/t20027/.clang-uml b/tests/t20027/.clang-uml index 714dc20b..d5bf1d3b 100644 --- a/tests/t20027/.clang-uml +++ b/tests/t20027/.clang-uml @@ -1,16 +1,13 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20027_sequence: type: sequence glob: - - tests/t20027/t20027.cc + - t20027.cc include: namespaces: - clanguml::t20027 access: - public - using_namespace: - - clanguml::t20027 + using_namespace: clanguml::t20027 from: - function: "clanguml::t20027::tmain()" \ No newline at end of file diff --git a/tests/t20028/.clang-uml b/tests/t20028/.clang-uml index 0094b818..69704427 100644 --- a/tests/t20028/.clang-uml +++ b/tests/t20028/.clang-uml @@ -1,17 +1,14 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20028_sequence: type: sequence glob: - - tests/t20028/t20028.cc + - t20028.cc include: namespaces: - clanguml::t20028 exclude: namespaces: - clanguml::t20028::detail - using_namespace: - - clanguml::t20028 + using_namespace: clanguml::t20028 from: - function: "clanguml::t20028::tmain()" \ No newline at end of file diff --git a/tests/t20029/.clang-uml b/tests/t20029/.clang-uml index 2041eb9a..fa297b02 100644 --- a/tests/t20029/.clang-uml +++ b/tests/t20029/.clang-uml @@ -1,20 +1,17 @@ -compilation_database_dir: .. -output_directory: diagrams add_compile_flags: - -fparse-all-comments diagrams: t20029_sequence: type: sequence glob: - - tests/t20029/t20029.cc + - t20029.cc include: namespaces: - clanguml::t20029 exclude: access: - private - using_namespace: - - clanguml::t20029 + using_namespace: clanguml::t20029 from: - function: clanguml::t20029::tmain() generate_message_comments: true diff --git a/tests/t20030/.clang-uml b/tests/t20030/.clang-uml index ea567241..70d16914 100644 --- a/tests/t20030/.clang-uml +++ b/tests/t20030/.clang-uml @@ -1,15 +1,12 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20030_sequence: type: sequence glob: - - tests/t20030/t20030.cc + - t20030.cc include: namespaces: - clanguml::t20030 - using_namespace: - - clanguml::t20030 + using_namespace: clanguml::t20030 from: - function: "clanguml::t20030::tmain(int)" - function: "clanguml::t20030::tmain(bool,int)" \ No newline at end of file diff --git a/tests/t20031/.clang-uml b/tests/t20031/.clang-uml index c3fc9cf3..d2645e82 100644 --- a/tests/t20031/.clang-uml +++ b/tests/t20031/.clang-uml @@ -1,10 +1,8 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20031_sequence: type: sequence glob: - - tests/t20031/t20031.cc + - t20031.cc include: namespaces: - clanguml::t20031 @@ -13,8 +11,7 @@ diagrams: - constructor - operator - lambda - using_namespace: - - clanguml::t20031 + using_namespace: clanguml::t20031 from: - function: "clanguml::t20031::tmain(int)" - function: "clanguml::t20031::tmain(bool,int)" \ No newline at end of file diff --git a/tests/t20032/.clang-uml b/tests/t20032/.clang-uml index c700aa06..93fcede4 100644 --- a/tests/t20032/.clang-uml +++ b/tests/t20032/.clang-uml @@ -1,15 +1,12 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20032_sequence: type: sequence glob: - - tests/t20032/t20032.cc + - t20032.cc include: namespaces: - clanguml::t20032 - using_namespace: - - clanguml::t20032 + using_namespace: clanguml::t20032 generate_return_types: true from: - function: "clanguml::t20032::tmain(int,char **)" \ No newline at end of file diff --git a/tests/t20033/.clang-uml b/tests/t20033/.clang-uml index c69328ea..b8c2df35 100644 --- a/tests/t20033/.clang-uml +++ b/tests/t20033/.clang-uml @@ -1,15 +1,12 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20033_sequence: type: sequence glob: - - tests/t20033/t20033.cc + - t20033.cc include: namespaces: - clanguml::t20033 - using_namespace: - - clanguml::t20033 + using_namespace: clanguml::t20033 generate_condition_statements: true from: - function: "clanguml::t20033::tmain()" \ No newline at end of file diff --git a/tests/t20034/.clang-uml b/tests/t20034/.clang-uml index 40562200..8f27657f 100644 --- a/tests/t20034/.clang-uml +++ b/tests/t20034/.clang-uml @@ -1,15 +1,12 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20034_sequence: type: sequence glob: - - tests/t20034/t20034.cc + - t20034.cc include: namespaces: - clanguml::t20034 - using_namespace: - - clanguml::t20034 + using_namespace: clanguml::t20034 from_to: - [function: "clanguml::t20034::D::d2()", function: "clanguml::t20034::A::a2()"] \ No newline at end of file diff --git a/tests/t20035/.clang-uml b/tests/t20035/.clang-uml index 9059020a..812598e4 100644 --- a/tests/t20035/.clang-uml +++ b/tests/t20035/.clang-uml @@ -1,15 +1,12 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20035_sequence: type: sequence glob: - - tests/t20035/t20035.cc + - t20035.cc include: namespaces: - clanguml::t20035 - using_namespace: - - clanguml::t20035 + using_namespace: clanguml::t20035 from_to: - [function: "clanguml::t20035::tmain(int,char **)", function: "clanguml::t20035::c(int)"] \ No newline at end of file diff --git a/tests/t20036/.clang-uml b/tests/t20036/.clang-uml index c89b120d..720baab3 100644 --- a/tests/t20036/.clang-uml +++ b/tests/t20036/.clang-uml @@ -1,14 +1,11 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20036_sequence: type: sequence glob: - - tests/t20036/t20036.cc + - t20036.cc include: namespaces: - clanguml::t20036 - using_namespace: - - clanguml::t20036 + using_namespace: clanguml::t20036 to: - function: "clanguml::t20036::A::a2()" \ No newline at end of file diff --git a/tests/t20037/.clang-uml b/tests/t20037/.clang-uml index 54c57eb2..558d0c10 100644 --- a/tests/t20037/.clang-uml +++ b/tests/t20037/.clang-uml @@ -1,14 +1,11 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t20037_sequence: type: sequence glob: - - tests/t20037/t20037.cc + - t20037.cc include: namespaces: - clanguml::t20037 - using_namespace: - - clanguml::t20037 + using_namespace: clanguml::t20037 from: - function: "clanguml::t20037::tmain(int,char **)" \ No newline at end of file diff --git a/tests/t20038/.clang-uml b/tests/t20038/.clang-uml index f56703a1..76afa834 100644 --- a/tests/t20038/.clang-uml +++ b/tests/t20038/.clang-uml @@ -1,12 +1,10 @@ -compilation_database_dir: .. -output_directory: diagrams add_compile_flags: - -fparse-all-comments diagrams: t20038_sequence: type: sequence glob: - - tests/t20038/t20038.cc + - t20038.cc include: namespaces: - clanguml::t20038 @@ -14,5 +12,4 @@ diagrams: - function: clanguml::t20038::tmain() generate_message_comments: true message_comment_width: 35 - using_namespace: - - clanguml::t20038 \ No newline at end of file + using_namespace: clanguml::t20038 \ No newline at end of file diff --git a/tests/t30001/.clang-uml b/tests/t30001/.clang-uml index 21466f6d..26a332b3 100644 --- a/tests/t30001/.clang-uml +++ b/tests/t30001/.clang-uml @@ -1,19 +1,16 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t30001_package: type: package title: Basic package diagram example glob: - - tests/t30001/t30001.cc + - t30001.cc include: namespaces: - clanguml::t30001 exclude: namespaces: - clanguml::t30001::detail - using_namespace: - - clanguml::t30001 + using_namespace: clanguml::t30001 plantuml: before: - "' t30001 test diagram of type {{ diagram.type }}" diff --git a/tests/t30002/.clang-uml b/tests/t30002/.clang-uml index e747d5e2..2f55a055 100644 --- a/tests/t30002/.clang-uml +++ b/tests/t30002/.clang-uml @@ -1,18 +1,15 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t30002_package: type: package glob: - - tests/t30002/t30002.cc + - t30002.cc include: namespaces: - clanguml::t30002 exclude: namespaces: - clanguml::t30002::detail - using_namespace: - - clanguml::t30002 + using_namespace: clanguml::t30002 plantuml: before: - "' t30002 test package diagram" \ No newline at end of file diff --git a/tests/t30003/.clang-uml b/tests/t30003/.clang-uml index 87a0b1c4..9d0e1f86 100644 --- a/tests/t30003/.clang-uml +++ b/tests/t30003/.clang-uml @@ -1,15 +1,12 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t30003_package: type: package glob: - - tests/t30003/t30003.cc + - t30003.cc include: namespaces: - clanguml::t30003 - using_namespace: - - clanguml::t30003 + using_namespace: clanguml::t30003 plantuml: before: - "' t30003 test package diagram" \ No newline at end of file diff --git a/tests/t30004/.clang-uml b/tests/t30004/.clang-uml index 9c71a5a7..ab3104fb 100644 --- a/tests/t30004/.clang-uml +++ b/tests/t30004/.clang-uml @@ -1,15 +1,12 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t30004_package: type: package glob: - - tests/t30004/t30004.cc + - t30004.cc include: namespaces: - clanguml::t30004 - using_namespace: - - clanguml::t30004 + using_namespace: clanguml::t30004 plantuml: before: - "' t30004 test package diagram" \ No newline at end of file diff --git a/tests/t30005/.clang-uml b/tests/t30005/.clang-uml index 56eeae88..7258eba3 100644 --- a/tests/t30005/.clang-uml +++ b/tests/t30005/.clang-uml @@ -1,15 +1,12 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t30005_package: type: package glob: - - tests/t30005/t30005.cc + - t30005.cc include: namespaces: - clanguml::t30005 - using_namespace: - - clanguml::t30005 + using_namespace: clanguml::t30005 plantuml: before: - "' t30005 test package diagram" \ No newline at end of file diff --git a/tests/t30006/.clang-uml b/tests/t30006/.clang-uml index 08eb530d..1247bf0d 100644 --- a/tests/t30006/.clang-uml +++ b/tests/t30006/.clang-uml @@ -1,15 +1,12 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t30006_package: type: package glob: - - tests/t30006/t30006.cc + - t30006.cc include: namespaces: - clanguml::t30006 - using_namespace: - - clanguml::t30006 + using_namespace: clanguml::t30006 plantuml: before: - "' t30006 test package diagram" \ No newline at end of file diff --git a/tests/t30007/.clang-uml b/tests/t30007/.clang-uml index 9f01cdea..d8f7129a 100644 --- a/tests/t30007/.clang-uml +++ b/tests/t30007/.clang-uml @@ -1,15 +1,12 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t30007_package: type: package glob: - - tests/t30007/t30007.cc + - t30007.cc include: namespaces: - clanguml::t30007 - using_namespace: - - clanguml::t30007 + using_namespace: clanguml::t30007 layout: C: - up: 'A::AA' diff --git a/tests/t30008/.clang-uml b/tests/t30008/.clang-uml index 0a4c65c8..c7d4d018 100644 --- a/tests/t30008/.clang-uml +++ b/tests/t30008/.clang-uml @@ -1,17 +1,14 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t30008_package: type: package glob: - - tests/t30008/t30008.cc + - t30008.cc include: dependants: - clanguml::t30008::dependants::A dependencies: - clanguml::t30008::dependencies::F - using_namespace: - - clanguml::t30008 + using_namespace: clanguml::t30008 plantuml: before: - "' t30008 test package diagram" \ No newline at end of file diff --git a/tests/t30009/.clang-uml b/tests/t30009/.clang-uml index ffdff80c..2563eb33 100644 --- a/tests/t30009/.clang-uml +++ b/tests/t30009/.clang-uml @@ -1,15 +1,12 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t30009_package: type: package glob: - - tests/t30009/t30009.cc + - t30009.cc include: namespaces: - clanguml::t30009 - using_namespace: - - clanguml::t30009 + using_namespace: clanguml::t30009 layout: One::A: - together: [One::C] diff --git a/tests/t30010/.clang-uml b/tests/t30010/.clang-uml index 9dc1339a..937f3fc8 100644 --- a/tests/t30010/.clang-uml +++ b/tests/t30010/.clang-uml @@ -1,5 +1,3 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t30010_package: type: package @@ -7,10 +5,8 @@ diagrams: package_type: directory glob: - t30010.cc - relative_to: ../../../tests/t30010 include: paths: - app - libraries - using_namespace: - - clanguml::t30010 \ No newline at end of file + using_namespace: clanguml::t30010 \ No newline at end of file diff --git a/tests/t30011/.clang-uml b/tests/t30011/.clang-uml index a379b981..8048435f 100644 --- a/tests/t30011/.clang-uml +++ b/tests/t30011/.clang-uml @@ -1,12 +1,9 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t30011_package: type: package package_type: directory glob: - t30011.c - relative_to: ../../../tests/t30011 include: paths: - . \ No newline at end of file diff --git a/tests/t40001/.clang-uml b/tests/t40001/.clang-uml index 2f977986..29f7755a 100644 --- a/tests/t40001/.clang-uml +++ b/tests/t40001/.clang-uml @@ -1,5 +1,3 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t40001_include: type: include @@ -8,7 +6,6 @@ diagrams: # for #include directives glob: - src/t40001.cc - relative_to: ../../../tests/t40001 # Include also external system headers generate_system_headers: true include: diff --git a/tests/t40002/.clang-uml b/tests/t40002/.clang-uml index 8c2b34db..17e36910 100644 --- a/tests/t40002/.clang-uml +++ b/tests/t40002/.clang-uml @@ -1,5 +1,3 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t40002_include: type: include @@ -9,7 +7,6 @@ diagrams: - src/t40002.cc - src/lib1/lib1.cc - src/lib2/lib2.cc - relative_to: ../../../tests/t40002 include: # Include only files belonging to these paths relative to relative_to paths: diff --git a/tests/t40003/.clang-uml b/tests/t40003/.clang-uml index 2fc3135d..7a2a11d7 100644 --- a/tests/t40003/.clang-uml +++ b/tests/t40003/.clang-uml @@ -1,5 +1,3 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t40003_include: type: include @@ -9,7 +7,6 @@ diagrams: - src/dependants/t1.cc - src/dependencies/t2.cc # Render the paths relative to this directory - relative_to: ../../../tests/t40003 include: # Include only files which depend on t1.h dependants: diff --git a/tests/t90000/.clang-uml b/tests/t90000/.clang-uml index 7f12a85b..9f020697 100644 --- a/tests/t90000/.clang-uml +++ b/tests/t90000/.clang-uml @@ -1,5 +1,3 @@ -compilation_database_dir: .. -output_directory: diagrams diagrams: t90000_class: type: class diff --git a/tests/test_cases.cc b/tests/test_cases.cc index 4fd9dd1d..9d62a5de 100644 --- a/tests/test_cases.cc +++ b/tests/test_cases.cc @@ -35,18 +35,6 @@ void inject_diagram_options(std::shared_ptr diagram) R"({% if existsIn(element, "comment") and existsIn(element.comment, "brief") %}{{ abbrv(trim(replace(element.comment.brief.0, "\n+", " ")), 256) }}{% else %}{{ element.name }}{% endif %})"}; diagram->generate_links.set(links_config); - - using namespace std::literals; - - std::vector tests_with_custom_relative_to_paths{ - "t00061_class"s, "t00065_class"s, "t20017_sequence"s, "t30010_package"s, - "t30011_package"s, "t40001_include"s, "t40002_include"s, - "t40003_include"s}; - - if (!clanguml::util::contains( - tests_with_custom_relative_to_paths, diagram->name)) { - diagram->get_relative_to().set("../../.."); - } } std::pair @@ -56,7 +44,20 @@ load_config(const std::string &test_name) clanguml::common::compilation_database_ptr> res; - res.first = clanguml::config::load(test_name + "/.clang-uml", true, true); + // Load configuration file from the project source tree instead of + // the test build directory + const auto test_config_path = + fmt::format("../../tests/{}/.clang-uml", test_name); + + const auto compilation_database_dir = canonical( + std::filesystem::current_path() / std::filesystem::path{".."}); + const auto output_directory = + std::filesystem::current_path() / std::filesystem::path{"diagrams"}; + + res.first = clanguml::config::load(test_config_path, true, false, true); + + res.first.compilation_database_dir.set(compilation_database_dir.string()); + res.first.output_directory.set(output_directory.string()); LOG_DBG("Loading compilation database from {}", res.first.compilation_database_dir()); diff --git a/tests/test_compilation_database.cc b/tests/test_compilation_database.cc index f3dd6e12..d52bdd39 100644 --- a/tests/test_compilation_database.cc +++ b/tests/test_compilation_database.cc @@ -15,10 +15,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#define CATCH_CONFIG_MAIN +#define CATCH_CONFIG_RUNNER +#define CATCH_CONFIG_CONSOLE_WIDTH 512 +#include "catch.h" + +#include "cli/cli_handler.h" #include "common/compilation_database.h" - #include "util/util.h" #include "catch.h" @@ -41,6 +44,7 @@ TEST_CASE("Test compilation_database should work", "[unit-test]") using clanguml::util::contains; using std::filesystem::path; + // This is executed by cmake in the directory `/tests` auto cfg = clanguml::config::load("./test_compilation_database_data/config.yml"); @@ -91,4 +95,37 @@ TEST_CASE("Test compilation_database should throw", "[unit-test]") REQUIRE_THROWS_AS( clanguml::common::compilation_database::auto_detect_from_directory(cfg), compilation_database_error); -} \ No newline at end of file +} + +/// +/// Main test function +/// +int main(int argc, char *argv[]) +{ + Catch::Session session; + using namespace Catch::clara; + + bool debug_log{false}; + auto cli = session.cli() | + Opt(debug_log, "debug_log")["-u"]["--debug-log"]("Enable debug logs"); + + session.cli(cli); + + int returnCode = session.applyCommandLine(argc, argv); + if (returnCode != 0) + return returnCode; + + clanguml::cli::cli_handler clih; + + std::vector argvv = { + "clang-uml", "--config", "./test_config_data/simple.yml"}; + + if (debug_log) + argvv.push_back("-vvv"); + else + argvv.push_back("-q"); + + clih.handle_options(argvv.size(), argvv.data()); + + return session.run(); +} diff --git a/tests/test_config.cc b/tests/test_config.cc index 0befda08..a17c0aef 100644 --- a/tests/test_config.cc +++ b/tests/test_config.cc @@ -343,6 +343,34 @@ TEST_CASE("Test config sequence inherited", "[unit-test]") CHECK(def.generate_return_types() == false); } +TEST_CASE("Test config relative paths handling", "[unit-test]") +{ + auto cfg = clanguml::config::load("./test_config_data/relative_to.yml"); + + CHECK(cfg.diagrams.size() == 2); + auto &def = *cfg.diagrams["class1"]; + CHECK(def.get_relative_to()() == "/tmp"); + CHECK(def.root_directory() == "/tmp"); + + def = *cfg.diagrams["class2"]; + CHECK(def.get_relative_to()() == "."); + CHECK(def.root_directory() == + fmt::format( + "{}/test_config_data", std::filesystem::current_path().string())); + + auto cfg2 = + clanguml::config::load("./test_config_data/relative_to_default.yml"); + + CHECK(cfg2.diagrams.size() == 1); + def = *cfg2.diagrams["class1"]; + CHECK(def.get_relative_to()() == + fmt::format( + "{}/test_config_data", std::filesystem::current_path().string())); + CHECK(def.root_directory() == + fmt::format( + "{}/test_config_data", std::filesystem::current_path().string())); +} + TEST_CASE("Test config full clang uml dump", "[unit-test]") { auto cfg = diff --git a/tests/test_config_data/relative_to.yml b/tests/test_config_data/relative_to.yml new file mode 100644 index 00000000..226bd8d5 --- /dev/null +++ b/tests/test_config_data/relative_to.yml @@ -0,0 +1,11 @@ +relative_to: /tmp +diagrams: + class1: + type: class + glob: + - test.cc + class2: + type: class + relative_to: . + glob: + - test.cc diff --git a/tests/test_config_data/relative_to_default.yml b/tests/test_config_data/relative_to_default.yml new file mode 100644 index 00000000..17cfa7e7 --- /dev/null +++ b/tests/test_config_data/relative_to_default.yml @@ -0,0 +1,5 @@ +diagrams: + class1: + type: class + glob: + - test.cc \ No newline at end of file