[commands] C++ CommandPtr: Prevent null initialization (#5991)

This commit is contained in:
Starlight220
2023-12-03 02:45:04 +02:00
committed by GitHub
parent 96914143ba
commit 5172ab8fd0
3 changed files with 12 additions and 2 deletions

View File

@@ -34,3 +34,7 @@ TEST_F(CommandPtrTest, MovedFrom) {
EXPECT_EQ(1, counter);
}
TEST_F(CommandPtrTest, NullInitialization) {
EXPECT_THROW(CommandPtr{std::unique_ptr<Command>{}}, frc::RuntimeError);
}