Updated test cases documentation

This commit is contained in:
Bartek Kryza
2021-07-25 18:13:56 +02:00
parent cf49fac808
commit 98cf942a9e
31 changed files with 131 additions and 70 deletions

View File

@@ -22,21 +22,25 @@ diagrams:
```
## Source code
File t00019.cc
File t00019_layer2.h
```cpp
#include "t00019_base.h"
#include "t00019_layer1.h"
#include "t00019_layer2.h"
#include "t00019_layer3.h"
#include <memory>
#pragma once
namespace clanguml {
namespace t00019 {
class A {
public:
std::unique_ptr<Layer1<Layer2<Layer3<Base>>>> layers;
template <typename LowerLayer> class Layer2 : public LowerLayer {
using LowerLayer::LowerLayer;
using LowerLayer::m1;
using LowerLayer::m2;
int all_calls_count() const
{
return LowerLayer::m1_calls() + LowerLayer::m2_calls();
}
};
}
}
@@ -94,6 +98,26 @@ template <typename LowerLayer> class Layer1 : public LowerLayer {
}
}
```
File t00019.cc
```cpp
#include "t00019_base.h"
#include "t00019_layer1.h"
#include "t00019_layer2.h"
#include "t00019_layer3.h"
#include <memory>
namespace clanguml {
namespace t00019 {
class A {
public:
std::unique_ptr<Layer1<Layer2<Layer3<Base>>>> layers;
};
}
}
```
File t00019_layer3.h
```cpp
@@ -131,30 +155,6 @@ private:
}
}
```
File t00019_layer2.h
```cpp
#pragma once
namespace clanguml {
namespace t00019 {
template <typename LowerLayer> class Layer2 : public LowerLayer {
using LowerLayer::LowerLayer;
using LowerLayer::m1;
using LowerLayer::m2;
int all_calls_count() const
{
return LowerLayer::m1_calls() + LowerLayer::m2_calls();
}
};
}
}
```
## Generated UML diagrams
![t00019_class](./t00019_class.png "Layercake pattern")