mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +00:00
SCRIPT: wpiformat
This commit is contained in:
committed by
Peter Johnson
parent
ae6bdc9d25
commit
2109161534
@@ -17,7 +17,7 @@ class MyTestClass {};
|
||||
namespace wpi::hal {
|
||||
TEST(HandleTest, ClassedHandle) {
|
||||
wpi::hal::IndexedClassedHandleResource<HAL_TestHandle, MyTestClass, 8,
|
||||
HAL_HandleEnum::Vendor>
|
||||
HAL_HandleEnum::Vendor>
|
||||
testClass;
|
||||
int32_t status = 0;
|
||||
testClass.Allocate(0, std::make_unique<MyTestClass>(), &status);
|
||||
|
||||
@@ -122,9 +122,11 @@ TEST(DriverStationTest, EventInfo) {
|
||||
constexpr std::string_view eventName = "UnitTest";
|
||||
constexpr std::string_view gameData = "Insert game specific info here :D";
|
||||
HAL_MatchInfo info;
|
||||
wpi::util::format_to_n_c_str(info.eventName, sizeof(info.eventName), eventName);
|
||||
wpi::util::format_to_n_c_str(reinterpret_cast<char*>(info.gameSpecificMessage),
|
||||
sizeof(info.gameSpecificMessage), gameData);
|
||||
wpi::util::format_to_n_c_str(info.eventName, sizeof(info.eventName),
|
||||
eventName);
|
||||
wpi::util::format_to_n_c_str(
|
||||
reinterpret_cast<char*>(info.gameSpecificMessage),
|
||||
sizeof(info.gameSpecificMessage), gameData);
|
||||
info.gameSpecificMessageSize = gameData.size();
|
||||
info.matchNumber = 5;
|
||||
info.matchType = HAL_MatchType::HAL_kMatchType_qualification;
|
||||
|
||||
Reference in New Issue
Block a user