Disabled test of template template parameters

This commit is contained in:
Bartek Kryza
2021-03-21 10:53:08 +01:00
parent 32948ab143
commit 7001c0870e
5 changed files with 26 additions and 12 deletions

View File

@@ -17,9 +17,19 @@ public:
CMP comparator;
};
template <typename T, template <typename> typename C> class B {
public:
/*
* TODO: Handle template template properly.
*
template <typename T, template <typename> typename C> struct B {
C<T> template_template;
};
struct D {
// libclang claims that the type spelling of 'ints' is 'int'...
B<int, std::vector> ints;
void add(int i) { ints.template_template.push_back(i); }
};
*/
}
}

View File

@@ -51,10 +51,6 @@ TEST_CASE("t00008", "[test-case][class]")
REQUIRE_THAT(puml, IsField(Public("std::array<int, N> ints")));
REQUIRE_THAT(puml, IsField(Public("bool (*)(int, int) comparator")));
REQUIRE_THAT(puml, IsClassTemplate("B", "T, C<>"));
REQUIRE_THAT(puml, IsField(Public("C<T> template_template")));
save_puml(
"./" + config.output_directory + "/" + diagram->name + ".puml", puml);
}

View File

@@ -40,7 +40,7 @@ class R {
public:
int get_a(A *a) { return a->a; }
int get_b(B &b) { return b.b; }
// TODO: int get_const_b(const B &b) { return b.b; }
int get_const_b(const B &b) { return b.b; }
int get_c(C c) { return c.c; }
int get_d(D &&d) { return d.d; }
// Dependency relationship should be rendered only once
@@ -51,6 +51,7 @@ public:
int get_int_e2(E<int> &e) { return e.e; }
template <typename T> T get_f(const F<T> &f) { return f.f; }
int get_int_f(const F<int> &f) { return f.f; }
private:
mutable E<std::string> estring;

View File

@@ -51,13 +51,15 @@ TEST_CASE("t00013", "[test-case][class]")
REQUIRE_THAT(puml, IsDependency(_A("R"), _A("B")));
REQUIRE_THAT(puml, IsDependency(_A("R"), _A("C")));
REQUIRE_THAT(puml, IsDependency(_A("R"), _A("D")));
REQUIRE_THAT(puml, IsDependency(_A("D"), _A("R")));
REQUIRE_THAT(puml, IsDependency(_A("R"), _A("E<T>")));
REQUIRE_THAT(puml, IsDependency(_A("R"), _A("E<int>")));
REQUIRE_THAT(puml, IsInstantiation(_A("E<T>"), _A("E<int>")));
REQUIRE_THAT(puml, IsInstantiation(_A("E<T>"), _A("E<std::string>")));
REQUIRE_THAT(puml, IsComposition(_A("R"), _A("E<std::string>"), "estring"));
REQUIRE_THAT(puml, IsDependency(_A("R"), _A("ABCD::F<T>")));
REQUIRE_THAT(puml, IsDependency(_A("D"), _A("R")));
REQUIRE_THAT(puml, IsInstantiation(_A("ABCD::F<T>"), _A("ABCD::F<int>")));
REQUIRE_THAT(puml, IsDependency(_A("R"), _A("ABCD::F<int>")));
save_puml(
"./" + config.output_directory + "/" + diagram->name + ".puml", puml);