Updated t00013 test case for variable template instantiation
This commit is contained in:
@@ -34,6 +34,11 @@ template <typename T> struct E {
|
||||
T e;
|
||||
};
|
||||
|
||||
template <typename T, typename... Args> struct G {
|
||||
T g;
|
||||
std::tuple<Args...> args;
|
||||
};
|
||||
|
||||
using namespace ABCD;
|
||||
class R {
|
||||
public:
|
||||
@@ -52,6 +57,8 @@ public:
|
||||
template <typename T> T get_f(const F<T> &f) { return f.f; }
|
||||
int get_int_f(const F<int> &f) { return f.f; }
|
||||
|
||||
G<int, float, std::string> gintstring;
|
||||
|
||||
private:
|
||||
mutable E<std::string> estring;
|
||||
};
|
||||
|
||||
@@ -40,6 +40,9 @@ TEST_CASE("t00013", "[test-case][class]")
|
||||
REQUIRE_THAT(puml, IsClass(_A("B")));
|
||||
REQUIRE_THAT(puml, IsClass(_A("C")));
|
||||
REQUIRE_THAT(puml, IsClass(_A("D")));
|
||||
REQUIRE_THAT(puml, IsClassTemplate("E", "T"));
|
||||
REQUIRE_THAT(puml, IsClassTemplate("G", "T,Args..."));
|
||||
|
||||
REQUIRE_THAT(puml, !IsDependency(_A("R"), _A("R")));
|
||||
REQUIRE_THAT(puml, IsDependency(_A("R"), _A("A")));
|
||||
REQUIRE_THAT(puml, IsDependency(_A("R"), _A("B")));
|
||||
@@ -56,6 +59,9 @@ TEST_CASE("t00013", "[test-case][class]")
|
||||
REQUIRE_THAT(puml, IsInstantiation(_A("ABCD::F<T>"), _A("F<int>")));
|
||||
REQUIRE_THAT(puml, IsDependency(_A("R"), _A("F<int>")));
|
||||
|
||||
REQUIRE_THAT(puml,
|
||||
IsInstantiation(_A("G<T,Args...>"), _A("G<int,float,std::string>")));
|
||||
|
||||
save_puml(
|
||||
"./" + config.output_directory() + "/" + diagram->name + ".puml", puml);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user