Updated test case documentation

This commit is contained in:
Bartek Kryza
2022-11-23 00:09:00 +01:00
parent b264ef5402
commit e2f34c7dda
68 changed files with 1679 additions and 1463 deletions

54
docs/test_cases/t20006.md Normal file
View File

@@ -0,0 +1,54 @@
# t20006 - Class template specialization basic sequence diagram
## Config
```yaml
compilation_database_dir: ..
output_directory: puml
diagrams:
t20006_sequence:
type: sequence
glob:
- ../../tests/t20006/t20006.cc
include:
namespaces:
- clanguml::t20006
using_namespace:
- clanguml::t20006
start_from:
- function: "clanguml::t20006::tmain()"
```
## Source code
File t20006.cc
```cpp
#include <string>
namespace clanguml {
namespace t20006 {
template <typename T> struct A {
T a_int(T arg) { return arg + 1; }
T a_string(T arg) { return arg + "_string"; }
};
template <typename T> struct B {
T b(T arg) { return a_.a_int(arg); }
A<T> a_;
};
template <> struct B<std::string> {
std::string b(std::string arg) { return a_.a_string(arg); }
A<std::string> a_;
};
void tmain()
{
B<int> bint;
B<std::string> bstring;
bint.b(1);
bstring.b("bstring");
}
}
}
```
## Generated UML diagrams
![t20006_sequence](./t20006_sequence.svg "Class template specialization basic sequence diagram")