[commands] Enhance Command Sendable implementations (#4822)

This commit is contained in:
Starlight220
2022-12-16 04:28:52 +02:00
committed by GitHub
parent 7713f68772
commit fbabd0ef15
33 changed files with 239 additions and 17 deletions

View File

@@ -198,3 +198,10 @@ TEST_F(CommandDecoratorTest, HandleInterrupt) {
// if `second == 1`, the second lambda ran before the first one
EXPECT_EQ(2, second);
}
TEST_F(CommandDecoratorTest, WithName) {
InstantCommand command;
std::string name{"Named"};
CommandPtr named = std::move(command).WithName(name);
EXPECT_EQ(name, named.get()->GetName());
}