Added handling of class template specializations
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
namespace clanguml {
|
||||
namespace t00016 {
|
||||
|
||||
template <typename T> struct is_numeric {
|
||||
template <typename> struct is_numeric {
|
||||
enum { value = false };
|
||||
};
|
||||
|
||||
|
||||
@@ -41,7 +41,20 @@ TEST_CASE("t00016", "[test-case][class]")
|
||||
|
||||
REQUIRE_THAT(puml, StartsWith("@startuml"));
|
||||
REQUIRE_THAT(puml, EndsWith("@enduml\n"));
|
||||
REQUIRE_THAT(puml, IsClass(_A("is_numeric")));
|
||||
REQUIRE_THAT(puml, IsClassTemplate("is_numeric", ""));
|
||||
REQUIRE_THAT(puml, IsClassTemplate("is_numeric", "int"));
|
||||
REQUIRE_THAT(puml, IsClassTemplate("is_numeric", "bool"));
|
||||
REQUIRE_THAT(puml, IsClassTemplate("is_numeric", "char"));
|
||||
REQUIRE_THAT(puml, IsClassTemplate("is_numeric", "unsigned char"));
|
||||
|
||||
REQUIRE_THAT(
|
||||
puml, IsInstantiation(_A("is_numeric<>"), _A("is_numeric<int>")));
|
||||
REQUIRE_THAT(
|
||||
puml, IsInstantiation(_A("is_numeric<>"), _A("is_numeric<bool>")));
|
||||
REQUIRE_THAT(
|
||||
puml, IsInstantiation(_A("is_numeric<>"), _A("is_numeric<char>")));
|
||||
REQUIRE_THAT(puml,
|
||||
IsInstantiation(_A("is_numeric<>"), _A("is_numeric<unsigned char>")));
|
||||
|
||||
save_puml(
|
||||
"./" + config.output_directory + "/" + diagram->name + ".puml", puml);
|
||||
|
||||
Reference in New Issue
Block a user