Updated test cases documentation
This commit is contained in:
223
docs/test_cases/t00078.md
Normal file
223
docs/test_cases/t00078.md
Normal file
@@ -0,0 +1,223 @@
|
||||
# t00078 - Test case for context diagram with relationships option
|
||||
## Config
|
||||
```yaml
|
||||
diagrams:
|
||||
t00078_class:
|
||||
type: class
|
||||
glob:
|
||||
- t00078.cc
|
||||
include:
|
||||
namespaces:
|
||||
- clanguml::t00078
|
||||
context:
|
||||
- match:
|
||||
radius: 1
|
||||
pattern: clanguml::t00078::A
|
||||
relationships:
|
||||
- inheritance
|
||||
- aggregation
|
||||
using_namespace: clanguml::t00078
|
||||
```
|
||||
## Source code
|
||||
File `tests/t00078/t00078.cc`
|
||||
```cpp
|
||||
namespace clanguml {
|
||||
namespace t00078 {
|
||||
|
||||
struct Base { };
|
||||
|
||||
struct D { };
|
||||
struct E { };
|
||||
struct A : public Base {
|
||||
D d;
|
||||
E *e;
|
||||
};
|
||||
|
||||
struct B {
|
||||
A *a;
|
||||
};
|
||||
|
||||
struct C {
|
||||
A a;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
## Generated PlantUML diagrams
|
||||

|
||||
## Generated Mermaid diagrams
|
||||

|
||||
## Generated JSON models
|
||||
```json
|
||||
{
|
||||
"diagram_type": "class",
|
||||
"elements": [
|
||||
{
|
||||
"bases": [],
|
||||
"display_name": "Base",
|
||||
"id": "8530329873091241519",
|
||||
"is_abstract": false,
|
||||
"is_nested": false,
|
||||
"is_struct": true,
|
||||
"is_template": false,
|
||||
"is_union": false,
|
||||
"members": [],
|
||||
"methods": [],
|
||||
"name": "Base",
|
||||
"namespace": "clanguml::t00078",
|
||||
"source_location": {
|
||||
"column": 8,
|
||||
"file": "t00078.cc",
|
||||
"line": 4,
|
||||
"translation_unit": "t00078.cc"
|
||||
},
|
||||
"template_parameters": [],
|
||||
"type": "class"
|
||||
},
|
||||
{
|
||||
"bases": [],
|
||||
"display_name": "D",
|
||||
"id": "827774810081248671",
|
||||
"is_abstract": false,
|
||||
"is_nested": false,
|
||||
"is_struct": true,
|
||||
"is_template": false,
|
||||
"is_union": false,
|
||||
"members": [],
|
||||
"methods": [],
|
||||
"name": "D",
|
||||
"namespace": "clanguml::t00078",
|
||||
"source_location": {
|
||||
"column": 8,
|
||||
"file": "t00078.cc",
|
||||
"line": 6,
|
||||
"translation_unit": "t00078.cc"
|
||||
},
|
||||
"template_parameters": [],
|
||||
"type": "class"
|
||||
},
|
||||
{
|
||||
"bases": [
|
||||
{
|
||||
"access": "public",
|
||||
"id": "8530329873091241519",
|
||||
"is_virtual": false,
|
||||
"name": "clanguml::t00078::Base"
|
||||
}
|
||||
],
|
||||
"display_name": "A",
|
||||
"id": "2648609453195038561",
|
||||
"is_abstract": false,
|
||||
"is_nested": false,
|
||||
"is_struct": true,
|
||||
"is_template": false,
|
||||
"is_union": false,
|
||||
"members": [
|
||||
{
|
||||
"access": "public",
|
||||
"is_static": false,
|
||||
"name": "d",
|
||||
"source_location": {
|
||||
"column": 7,
|
||||
"file": "t00078.cc",
|
||||
"line": 9,
|
||||
"translation_unit": "t00078.cc"
|
||||
},
|
||||
"type": "D"
|
||||
},
|
||||
{
|
||||
"access": "public",
|
||||
"is_static": false,
|
||||
"name": "e",
|
||||
"source_location": {
|
||||
"column": 8,
|
||||
"file": "t00078.cc",
|
||||
"line": 10,
|
||||
"translation_unit": "t00078.cc"
|
||||
},
|
||||
"type": "E *"
|
||||
}
|
||||
],
|
||||
"methods": [],
|
||||
"name": "A",
|
||||
"namespace": "clanguml::t00078",
|
||||
"source_location": {
|
||||
"column": 8,
|
||||
"file": "t00078.cc",
|
||||
"line": 8,
|
||||
"translation_unit": "t00078.cc"
|
||||
},
|
||||
"template_parameters": [],
|
||||
"type": "class"
|
||||
},
|
||||
{
|
||||
"bases": [],
|
||||
"display_name": "C",
|
||||
"id": "17273429802989715399",
|
||||
"is_abstract": false,
|
||||
"is_nested": false,
|
||||
"is_struct": true,
|
||||
"is_template": false,
|
||||
"is_union": false,
|
||||
"members": [
|
||||
{
|
||||
"access": "public",
|
||||
"is_static": false,
|
||||
"name": "a",
|
||||
"source_location": {
|
||||
"column": 7,
|
||||
"file": "t00078.cc",
|
||||
"line": 18,
|
||||
"translation_unit": "t00078.cc"
|
||||
},
|
||||
"type": "A"
|
||||
}
|
||||
],
|
||||
"methods": [],
|
||||
"name": "C",
|
||||
"namespace": "clanguml::t00078",
|
||||
"source_location": {
|
||||
"column": 8,
|
||||
"file": "t00078.cc",
|
||||
"line": 17,
|
||||
"translation_unit": "t00078.cc"
|
||||
},
|
||||
"template_parameters": [],
|
||||
"type": "class"
|
||||
}
|
||||
],
|
||||
"name": "t00078_class",
|
||||
"package_type": "namespace",
|
||||
"relationships": [
|
||||
{
|
||||
"access": "public",
|
||||
"destination": "827774810081248671",
|
||||
"label": "d",
|
||||
"source": "2648609453195038561",
|
||||
"type": "aggregation"
|
||||
},
|
||||
{
|
||||
"access": "public",
|
||||
"destination": "13336639887154812399",
|
||||
"label": "e",
|
||||
"source": "2648609453195038561",
|
||||
"type": "association"
|
||||
},
|
||||
{
|
||||
"access": "public",
|
||||
"destination": "8530329873091241519",
|
||||
"source": "2648609453195038561",
|
||||
"type": "extension"
|
||||
},
|
||||
{
|
||||
"access": "public",
|
||||
"destination": "2648609453195038561",
|
||||
"label": "a",
|
||||
"source": "17273429802989715399",
|
||||
"type": "aggregation"
|
||||
}
|
||||
],
|
||||
"using_namespace": "clanguml::t00078"
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user