Added smart pointer alias to t20009 test case
This commit is contained in:
@@ -13,13 +13,17 @@ template <typename T> struct B {
|
||||
std::unique_ptr<A<T>> a;
|
||||
};
|
||||
|
||||
using BFloatPtr = std::shared_ptr<B<float>>;
|
||||
|
||||
void tmain()
|
||||
{
|
||||
std::shared_ptr<B<std::string>> bstring;
|
||||
auto bint = std::make_unique<B<int>>();
|
||||
BFloatPtr bfloat;
|
||||
|
||||
bstring->b("b");
|
||||
bint.get()->b(42);
|
||||
bfloat->b(1.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -42,6 +42,8 @@ TEST_CASE("t20009", "[test-case][sequence]")
|
||||
REQUIRE_THAT(puml, HasCall(_A("tmain()"), _A("B<int>"), "b"));
|
||||
REQUIRE_THAT(puml, HasCall(_A("B<int>"), _A("A<int>"), "a"));
|
||||
|
||||
REQUIRE_THAT(puml, HasCall(_A("tmain()"), _A("B<float>"), "b"));
|
||||
REQUIRE_THAT(puml, HasCall(_A("B<float>"), _A("A<float>"), "a"));
|
||||
save_puml(
|
||||
"./" + config.output_directory() + "/" + diagram->name + ".puml", puml);
|
||||
}
|
||||
Reference in New Issue
Block a user