Added support for external system headers
This commit is contained in:
@@ -10,6 +10,8 @@ diagrams:
|
||||
- ../../tests/t40001/**/*.h
|
||||
# Render the paths relative to this directory
|
||||
relative_to: ../../tests/t40001
|
||||
# Include also external system headers
|
||||
generate_system_headers: true
|
||||
include:
|
||||
# Include only headers belonging to these paths
|
||||
paths:
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
#include "lib1/lib1.h"
|
||||
|
||||
#include <cppast/cpp_preprocessor.hpp>
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace clanguml::t40001 {
|
||||
|
||||
int foo() { return lib1::foo2(); }
|
||||
|
||||
@@ -40,9 +40,14 @@ TEST_CASE("t40001", "[test-case][package]")
|
||||
REQUIRE_THAT(puml, IsFile("t40001.cc"));
|
||||
REQUIRE_THAT(puml, IsFile("t40001_include1.h"));
|
||||
|
||||
REQUIRE_THAT(puml, IsFile("string"));
|
||||
REQUIRE_THAT(puml, IsFile("cppast/cpp_preprocessor.hpp"));
|
||||
|
||||
REQUIRE_THAT(puml, IsAssociation(_A("t40001.cc"), _A("t40001_include1.h")));
|
||||
REQUIRE_THAT(puml, IsAssociation(_A("t40001_include1.h"), _A("lib1.h")));
|
||||
|
||||
REQUIRE_THAT(puml, IsDependency(_A("t40001_include1.h"), _A("string")));
|
||||
|
||||
save_puml(
|
||||
"./" + config.output_directory() + "/" + diagram->name + ".puml", puml);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "../../include/lib1/lib1.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace clanguml::t40002::lib1 {
|
||||
|
||||
int foo0() { return 0; }
|
||||
|
||||
@@ -44,6 +44,8 @@ TEST_CASE("t40002", "[test-case][package]")
|
||||
REQUIRE_THAT(puml, IsFile("lib1.cc"));
|
||||
REQUIRE_THAT(puml, IsFile("lib2.cc"));
|
||||
|
||||
REQUIRE_THAT(puml, !IsFile("string"));
|
||||
|
||||
REQUIRE_THAT(puml, IsAssociation(_A("t40002.cc"), _A("lib1.h")));
|
||||
REQUIRE_THAT(puml, IsAssociation(_A("lib1.h"), _A("lib2.h")));
|
||||
REQUIRE_THAT(puml, IsAssociation(_A("lib1.cc"), _A("lib1.h")));
|
||||
|
||||
Reference in New Issue
Block a user