Fixed template instantiations generation without known primary template
This commit is contained in:
@@ -10,3 +10,7 @@ diagrams:
|
||||
include:
|
||||
namespaces:
|
||||
- clanguml::t00014
|
||||
exclude:
|
||||
namespaces:
|
||||
- std
|
||||
- clanguml::t00014::std
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <ios>
|
||||
#include <map>
|
||||
#include <numeric>
|
||||
@@ -27,6 +28,9 @@ template <typename T, typename P> struct A {
|
||||
|
||||
template <typename T> using AString = A<T, std::string>;
|
||||
|
||||
template <typename... T> using GeneralCallback = std::function<void(T..., int)>;
|
||||
using VoidCallback = GeneralCallback<>;
|
||||
|
||||
struct B {
|
||||
std::string value;
|
||||
};
|
||||
@@ -46,6 +50,8 @@ class R {
|
||||
AStringString stringstring;
|
||||
BVector bs;
|
||||
BVector2 bs2;
|
||||
GeneralCallback<AIntString> cb;
|
||||
VoidCallback vcb;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* tests/t00014/test_case.cc
|
||||
* tests/t00014/test_case.h
|
||||
*
|
||||
* Copyright (c) 2021 Bartek Kryza <bkryza@gmail.com>
|
||||
*
|
||||
@@ -27,7 +27,7 @@ TEST_CASE("t00014", "[test-case][class]")
|
||||
REQUIRE_THAT(diagram->include.namespaces,
|
||||
VectorContains(std::string{"clanguml::t00014"}));
|
||||
|
||||
REQUIRE(diagram->exclude.namespaces.size() == 0);
|
||||
REQUIRE(diagram->exclude.namespaces.size() == 2);
|
||||
|
||||
REQUIRE(diagram->should_include("clanguml::t00014::S"));
|
||||
|
||||
@@ -46,9 +46,6 @@ TEST_CASE("t00014", "[test-case][class]")
|
||||
REQUIRE_THAT(puml, IsClassTemplate("AString", "float"));
|
||||
|
||||
REQUIRE_THAT(puml, IsInstantiation(_A("A<T,P>"), _A("A<T,std::string>")));
|
||||
// TODO
|
||||
// REQUIRE_THAT(puml, IsInstantiation(_A("A<T,std::string>"),
|
||||
// _A("A<bool,std::string>")));
|
||||
REQUIRE_THAT(
|
||||
puml, IsInstantiation(_A("A<T,std::string>"), _A("AString<float>")));
|
||||
REQUIRE_THAT(
|
||||
|
||||
Reference in New Issue
Block a user