Added basic include diagram test case
This commit is contained in:
@@ -3,8 +3,17 @@ output_directory: puml
|
||||
diagrams:
|
||||
t40001_include:
|
||||
type: include
|
||||
# Provide the files to parse in order to look
|
||||
# for #include directives
|
||||
glob:
|
||||
- ../../tests/t40001/t40001.cc
|
||||
- ../../tests/t40001/**/*.cc
|
||||
- ../../tests/t40001/**/*.h
|
||||
# Render the paths relative to this directory
|
||||
relative_to: ../../tests/t40001
|
||||
include:
|
||||
# Include only headers belonging to these paths
|
||||
paths:
|
||||
- ../../tests/t40001
|
||||
plantuml:
|
||||
before:
|
||||
- "' t40001 test include diagram"
|
||||
7
tests/t40001/include/lib1/lib1.h
Normal file
7
tests/t40001/include/lib1/lib1.h
Normal file
@@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace clanguml::t40001::lib1 {
|
||||
|
||||
int foo2() { return 0; }
|
||||
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "include/t40001_include1.h"
|
||||
#include "../include/t40001_include1.h"
|
||||
|
||||
namespace clanguml {
|
||||
namespace t40001 {
|
||||
|
||||
@@ -35,6 +35,14 @@ TEST_CASE("t40001", "[test-case][package]")
|
||||
REQUIRE_THAT(puml, StartsWith("@startuml"));
|
||||
REQUIRE_THAT(puml, EndsWith("@enduml\n"));
|
||||
|
||||
REQUIRE_THAT(puml, IsFolder("lib1"));
|
||||
REQUIRE_THAT(puml, IsFile("lib1.h"));
|
||||
REQUIRE_THAT(puml, IsFile("t40001.cc"));
|
||||
REQUIRE_THAT(puml, IsFile("t40001_include1.h"));
|
||||
|
||||
REQUIRE_THAT(puml, IsAssociation(_A("t40001.cc"), _A("t40001_include1.h")));
|
||||
REQUIRE_THAT(puml, IsAssociation(_A("t40001_include1.h"), _A("lib1.h")));
|
||||
|
||||
save_puml(
|
||||
"./" + config.output_directory() + "/" + diagram->name + ".puml", puml);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user