mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[commands] C++ CommandPtr: Prevent null initialization (#5991)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user