SCRIPT namespace replacements

This commit is contained in:
PJ Reiniger
2025-11-07 20:00:05 -05:00
committed by Peter Johnson
parent ae6c043632
commit 9aca8e0fd6
2622 changed files with 22275 additions and 22275 deletions

View File

@@ -7,7 +7,7 @@
#include "wpi/math/controller/ArmFeedforward.hpp"
#include "wpi/util/SmallVector.hpp"
using namespace frc;
using namespace wpi::math;
namespace {
@@ -19,8 +19,8 @@ const ArmFeedforward kExpectedData{Ks, Kg, Kv, Ka};
} // namespace
TEST(ArmFeedforwardProtoTest, Roundtrip) {
wpi::ProtobufMessage<decltype(kExpectedData)> message;
wpi::SmallVector<uint8_t, 64> buf;
wpi::util::ProtobufMessage<decltype(kExpectedData)> message;
wpi::util::SmallVector<uint8_t, 64> buf;
ASSERT_TRUE(message.Pack(buf, kExpectedData));
auto unpacked_data = message.Unpack(buf);

View File

@@ -7,7 +7,7 @@
#include "../../ProtoTestBase.hpp"
#include "wpi/math/controller/DifferentialDriveFeedforward.hpp"
using namespace frc;
using namespace wpi::math;
struct DifferentialDriveFeedforwardProtoTestData {
using Type = DifferentialDriveFeedforward;

View File

@@ -7,19 +7,19 @@
#include "wpi/math/controller/DifferentialDriveWheelVoltages.hpp"
#include "wpi/util/SmallVector.hpp"
using namespace frc;
using namespace wpi::math;
namespace {
using ProtoType = wpi::Protobuf<frc::DifferentialDriveWheelVoltages>;
using ProtoType = wpi::util::Protobuf<wpi::math::DifferentialDriveWheelVoltages>;
const DifferentialDriveWheelVoltages kExpectedData =
DifferentialDriveWheelVoltages{0.174_V, 0.191_V};
} // namespace
TEST(DifferentialDriveWheelVoltagesProtoTest, Roundtrip) {
wpi::ProtobufMessage<decltype(kExpectedData)> message;
wpi::SmallVector<uint8_t, 64> buf;
wpi::util::ProtobufMessage<decltype(kExpectedData)> message;
wpi::util::SmallVector<uint8_t, 64> buf;
ASSERT_TRUE(message.Pack(buf, kExpectedData));
auto unpacked_data = message.Unpack(buf);

View File

@@ -7,7 +7,7 @@
#include "wpi/math/controller/ElevatorFeedforward.hpp"
#include "wpi/util/SmallVector.hpp"
using namespace frc;
using namespace wpi::math;
namespace {
@@ -20,8 +20,8 @@ constexpr ElevatorFeedforward kExpectedData{Ks, Kg, Kv, Ka};
} // namespace
TEST(ElevatorFeedforwardProtoTest, Roundtrip) {
wpi::ProtobufMessage<decltype(kExpectedData)> message;
wpi::SmallVector<uint8_t, 64> buf;
wpi::util::ProtobufMessage<decltype(kExpectedData)> message;
wpi::util::SmallVector<uint8_t, 64> buf;
ASSERT_TRUE(message.Pack(buf, kExpectedData));
auto unpacked_data = message.Unpack(buf);

View File

@@ -10,15 +10,15 @@
#include "wpi/units/acceleration.hpp"
#include "wpi/units/velocity.hpp"
using namespace frc;
using namespace wpi::math;
template <typename T>
struct SimpleMotorFeedforwardProtoTestData {
using Type = SimpleMotorFeedforward<T>;
inline static const Type kTestData = {
units::volt_t{0.4}, units::volt_t{4.0} / (units::unit_t<T>{1} / 1_s),
units::volt_t{0.7} / (units::unit_t<T>{1} / 1_s / 1_s), 25_ms};
wpi::units::volt_t{0.4}, wpi::units::volt_t{4.0} / (wpi::units::unit_t<T>{1} / 1_s),
wpi::units::volt_t{0.7} / (wpi::units::unit_t<T>{1} / 1_s / 1_s), 25_ms};
static void CheckEq(const Type& testData, const Type& data) {
EXPECT_EQ(testData.GetKs().value(), data.GetKs().value());
@@ -30,10 +30,10 @@ struct SimpleMotorFeedforwardProtoTestData {
INSTANTIATE_TYPED_TEST_SUITE_P(
SimpleMotorFeedforwardMeters, ProtoTest,
SimpleMotorFeedforwardProtoTestData<units::meters>);
SimpleMotorFeedforwardProtoTestData<wpi::units::meters>);
INSTANTIATE_TYPED_TEST_SUITE_P(
SimpleMotorFeedforwardFeet, ProtoTest,
SimpleMotorFeedforwardProtoTestData<units::feet>);
SimpleMotorFeedforwardProtoTestData<wpi::units::feet>);
INSTANTIATE_TYPED_TEST_SUITE_P(
SimpleMotorFeedforwardRadians, ProtoTest,
SimpleMotorFeedforwardProtoTestData<units::radians>);
SimpleMotorFeedforwardProtoTestData<wpi::units::radians>);