mirror of
https://github.com/bkryza/clang-uml.git
synced 2025-05-26 00:37:13 +08:00
Updated test cases documentation
This commit is contained in:
parent
ed999d9f5c
commit
ec6b66391f
@ -27,6 +27,9 @@
|
||||
* [t00026](./test_cases/t00026.md) - Template memento pattern
|
||||
* [t00027](./test_cases/t00027.md) - Template decorator pattern
|
||||
* [t00028](./test_cases/t00028.md) - PlantUML note decorator test case
|
||||
* [t00029](./test_cases/t00029.md) - PlantUML skip decorator test case
|
||||
* [t00030](./test_cases/t00030.md) - PlantUML relationship decorators test case
|
||||
* [t00031](./test_cases/t00031.md) - PlantUML style decorator test case
|
||||
## Sequence diagrams
|
||||
* [t20001](./test_cases/t20001.md) - Basic sequence diagram
|
||||
## Configuration diagrams
|
||||
|
77
docs/test_cases/t00029.md
Normal file
77
docs/test_cases/t00029.md
Normal file
@ -0,0 +1,77 @@
|
||||
# t00029 - PlantUML skip decorator test case
|
||||
## Config
|
||||
```yaml
|
||||
compilation_database_dir: ..
|
||||
output_directory: puml
|
||||
diagrams:
|
||||
t00029_class:
|
||||
type: class
|
||||
glob:
|
||||
- ../../tests/t00029/t00029.cc
|
||||
using_namespace:
|
||||
- clanguml::t00029
|
||||
include:
|
||||
namespaces:
|
||||
- clanguml::t00029
|
||||
|
||||
```
|
||||
## Source code
|
||||
File t00029.cc
|
||||
```cpp
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
namespace clanguml {
|
||||
namespace t00029 {
|
||||
|
||||
class A {
|
||||
};
|
||||
|
||||
/// \uml{skip}
|
||||
class B {
|
||||
};
|
||||
|
||||
template <typename T> class C {
|
||||
T param;
|
||||
};
|
||||
|
||||
/// @uml{skip:t00029_class}
|
||||
template <typename T> class D {
|
||||
T param;
|
||||
};
|
||||
|
||||
enum class E { one, two, three };
|
||||
|
||||
/// \uml{skip}
|
||||
enum class F { red, green, blue };
|
||||
|
||||
class G1 {
|
||||
};
|
||||
|
||||
class G2 {
|
||||
};
|
||||
|
||||
class G3 {
|
||||
};
|
||||
|
||||
class G4 {
|
||||
};
|
||||
|
||||
struct R {
|
||||
G1 g1;
|
||||
|
||||
/// \uml{skip}
|
||||
G2 g2;
|
||||
|
||||
/// \uml{skiprelationship}
|
||||
G3 &g3;
|
||||
|
||||
std::shared_ptr<G4> g4;
|
||||
};
|
||||
|
||||
} // namespace t00029
|
||||
} // namespace clanguml
|
||||
|
||||
```
|
||||
## Generated UML diagrams
|
||||

|
BIN
docs/test_cases/t00029_class.png
Normal file
BIN
docs/test_cases/t00029_class.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
58
docs/test_cases/t00030.md
Normal file
58
docs/test_cases/t00030.md
Normal file
@ -0,0 +1,58 @@
|
||||
# t00030 - PlantUML relationship decorators test case
|
||||
## Config
|
||||
```yaml
|
||||
compilation_database_dir: ..
|
||||
output_directory: puml
|
||||
diagrams:
|
||||
t00030_class:
|
||||
type: class
|
||||
glob:
|
||||
- ../../tests/t00030/t00030.cc
|
||||
using_namespace:
|
||||
- clanguml::t00030
|
||||
include:
|
||||
namespaces:
|
||||
- clanguml::t00030
|
||||
|
||||
```
|
||||
## Source code
|
||||
File t00030.cc
|
||||
```cpp
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
namespace clanguml {
|
||||
namespace t00030 {
|
||||
|
||||
class A {
|
||||
};
|
||||
|
||||
class B {
|
||||
};
|
||||
|
||||
class C {
|
||||
};
|
||||
|
||||
class D {
|
||||
};
|
||||
|
||||
struct R {
|
||||
/// @uml{association[]}
|
||||
A aaa;
|
||||
|
||||
/// @uml{composition[0..1:1..*]}
|
||||
std::vector<B> bbb;
|
||||
|
||||
/// @uml{aggregation[0..1:1..5]}
|
||||
std::vector<C> ccc;
|
||||
|
||||
/// @uml{association[:1]}
|
||||
D ddd;
|
||||
};
|
||||
|
||||
} // namespace t00030
|
||||
} // namespace clanguml
|
||||
|
||||
```
|
||||
## Generated UML diagrams
|
||||

|
BIN
docs/test_cases/t00030_class.png
Normal file
BIN
docs/test_cases/t00030_class.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
66
docs/test_cases/t00031.md
Normal file
66
docs/test_cases/t00031.md
Normal file
@ -0,0 +1,66 @@
|
||||
# t00031 - PlantUML style decorator test case
|
||||
## Config
|
||||
```yaml
|
||||
compilation_database_dir: ..
|
||||
output_directory: puml
|
||||
diagrams:
|
||||
t00031_class:
|
||||
type: class
|
||||
glob:
|
||||
- ../../tests/t00031/t00031.cc
|
||||
using_namespace:
|
||||
- clanguml::t00031
|
||||
include:
|
||||
namespaces:
|
||||
- clanguml::t00031
|
||||
|
||||
```
|
||||
## Source code
|
||||
File t00031.cc
|
||||
```cpp
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
namespace clanguml {
|
||||
namespace t00031 {
|
||||
|
||||
/// @uml{style[#back:lightgreen|yellow;header:blue/red]}
|
||||
class A {
|
||||
};
|
||||
|
||||
/// @uml{style[#line.dotted:blue]}
|
||||
enum B {
|
||||
one,
|
||||
two,
|
||||
three
|
||||
};
|
||||
|
||||
/// @uml{style[#pink;line:red;line.bold;text:red]}
|
||||
template<typename T> class C {
|
||||
T ttt;
|
||||
};
|
||||
|
||||
class D {
|
||||
};
|
||||
|
||||
struct R {
|
||||
/// @uml{style[#red,dashed,thickness=2]}
|
||||
A *aaa;
|
||||
|
||||
/// @uml{composition}
|
||||
/// @uml{style[#green,dashed,thickness=4]}
|
||||
std::vector<B> bbb;
|
||||
|
||||
/// @uml{style[#blue,dotted,thickness=8]}
|
||||
C<int> ccc;
|
||||
|
||||
/// @uml{style[#blue,plain,thickness=16]}
|
||||
D *ddd;
|
||||
};
|
||||
|
||||
} // namespace t00031
|
||||
} // namespace clanguml
|
||||
|
||||
```
|
||||
## Generated UML diagrams
|
||||

|
BIN
docs/test_cases/t00031_class.png
Normal file
BIN
docs/test_cases/t00031_class.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
@ -81,6 +81,15 @@ test_cases:
|
||||
- name: t00028
|
||||
title: PlantUML note decorator test case
|
||||
description:
|
||||
- name: t00029
|
||||
title: PlantUML skip decorator test case
|
||||
description:
|
||||
- name: t00030
|
||||
title: PlantUML relationship decorators test case
|
||||
description:
|
||||
- name: t00031
|
||||
title: PlantUML style decorator test case
|
||||
description:
|
||||
Sequence diagrams:
|
||||
- name: t20001
|
||||
title: Basic sequence diagram
|
||||
|
Loading…
x
Reference in New Issue
Block a user