Updated test cases documentation

This commit is contained in:
Bartek Kryza
2023-12-22 21:44:17 +01:00
parent 3671bf9beb
commit bf7b69bcca
381 changed files with 26178 additions and 19073 deletions

View File

@@ -17,7 +17,33 @@ diagrams:
- function: "clanguml::t20014::tmain()"
```
## Source code
File t20014.cc
File `tests/t20014/t20014_a.cc`
```cpp
#include "include/t20014_a.h"
namespace clanguml {
namespace t20014 {
int A::a1(int i, int j) { return i + j; }
int A::a2(int i, int j) { return i - j; }
}
}
```
File `tests/t20014/t20014_b.cc`
```cpp
#include "include/t20014_b.h"
namespace clanguml {
namespace t20014 {
int B::b1(int i, int j) { return a_.a1(i, j); }
int B::b2(int i, int j) { return a_.a2(i, j); }
}
}
```
File `tests/t20014/t20014.cc`
```cpp
#include "include/t20014.h"
#include "include/t20014_b.h"
@@ -43,39 +69,77 @@ int tmain()
}
}
```
File t20014_a.cc
```cpp
#include "include/t20014_a.h"
namespace clanguml {
namespace t20014 {
int A::a1(int i, int j) { return i + j; }
int A::a2(int i, int j) { return i - j; }
}
}
```
File t20014_b.cc
```cpp
#include "include/t20014_b.h"
namespace clanguml {
namespace t20014 {
int B::b1(int i, int j) { return a_.a1(i, j); }
int B::b2(int i, int j) { return a_.a2(i, j); }
}
}
```
File t20014_c.cc
File `tests/t20014/t20014_c.cc`
```cpp
#include "include/t20014_c.h"
namespace clanguml {
namespace t20014 {
}
}
```
File `tests/t20014/include/t20014.h`
```cpp
#pragma once
namespace clanguml {
namespace t20014 {
int tmain();
}
}
```
File `tests/t20014/include/t20014_b.h`
```cpp
#pragma once
#include "t20014_a.h"
namespace clanguml {
namespace t20014 {
struct B {
int b1(int i, int);
int b2(int i, int);
A a_;
};
}
}
```
File `tests/t20014/include/t20014_c.h`
```cpp
#pragma once
namespace clanguml {
namespace t20014 {
template <typename T, typename F> struct C {
F c1(F i, F j) { return c_.b1(i, j); }
F c2(F i, F j) { return c_.b2(i, j); }
T c_;
};
}
}
```
File `tests/t20014/include/t20014_a.h`
```cpp
#pragma once
namespace clanguml {
namespace t20014 {
struct A {
int a1(int i, int j);
int a2(int i, int j);
};
}
}
```