From 8e2a7fd3069d32377cc147afbe69868c22d005b7 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Mon, 28 Aug 2023 15:13:34 -0700 Subject: [PATCH] Include thirdparty libraries with angle brackets (#5578) --- .styleguide | 2 +- .../src/test/native/cpp/AprilTagDetectorTest.cpp | 3 ++- apriltag/src/test/native/cpp/AprilTagJsonTest.cpp | 2 +- .../test/native/cpp/AprilTagPoseSetOriginTest.cpp | 2 +- apriltag/src/test/native/cpp/LoadConfigTest.cpp | 3 ++- apriltag/src/test/native/cpp/main.cpp | 2 +- cameraserver/.styleguide | 1 + .../src/main/native/cpp/AnalogTest.cpp | 2 +- .../src/main/native/cpp/DIOTest.cpp | 2 +- .../src/main/native/cpp/DutyCycleTest.cpp | 2 +- .../src/main/native/cpp/Main.cpp | 2 +- .../src/main/native/cpp/PWMTest.cpp | 2 +- .../src/main/native/cpp/RelayAnalogTest.cpp | 2 +- .../src/main/native/cpp/RelayDigitalTest.cpp | 2 +- .../src/main/native/cpp/TestEnvironment.cpp | 2 +- cscore/.styleguide | 1 + cscore/src/test/native/cpp/CameraSourceTest.cpp | 3 ++- cscore/src/test/native/cpp/main.cpp | 2 +- hal/.styleguide | 1 + hal/src/test/native/cpp/HALTest.cpp | 3 ++- hal/src/test/native/cpp/can/CANTest.cpp | 3 ++- hal/src/test/native/cpp/handles/HandleTest.cpp | 3 ++- hal/src/test/native/cpp/main.cpp | 3 ++- .../test/native/cpp/mockdata/AnalogInDataTest.cpp | 3 ++- .../test/native/cpp/mockdata/AnalogOutDataTest.cpp | 3 ++- hal/src/test/native/cpp/mockdata/DIODataTest.cpp | 3 ++- .../native/cpp/mockdata/DriverStationDataTest.cpp | 3 ++- hal/src/test/native/cpp/mockdata/I2CDataTest.cpp | 3 ++- hal/src/test/native/cpp/mockdata/PCMDataTest.cpp | 3 ++- hal/src/test/native/cpp/mockdata/PDPDataTest.cpp | 3 ++- hal/src/test/native/cpp/mockdata/PWMDataTest.cpp | 3 ++- hal/src/test/native/cpp/mockdata/RelayDataTest.cpp | 3 ++- hal/src/test/native/cpp/mockdata/SPIDataTest.cpp | 3 ++- .../test/native/cpp/mockdata/SimDeviceDataTest.cpp | 3 ++- imgui/.styleguide | 12 ------------ ntcore/.styleguide | 1 + .../src/test/native/cpp/ConnectionListenerTest.cpp | 2 +- ntcore/src/test/native/cpp/LocalStorageTest.cpp | 3 ++- ntcore/src/test/native/cpp/LoggerTest.cpp | 2 +- ntcore/src/test/native/cpp/NetworkTableTest.cpp | 3 ++- ntcore/src/test/native/cpp/TableListenerTest.cpp | 3 ++- ntcore/src/test/native/cpp/TestPrinters.h | 2 +- ntcore/src/test/native/cpp/TimeSyncTest.cpp | 3 ++- ntcore/src/test/native/cpp/TopicListenerTest.cpp | 2 +- ntcore/src/test/native/cpp/ValueListenerTest.cpp | 2 +- ntcore/src/test/native/cpp/ValueTest.cpp | 3 ++- ntcore/src/test/native/cpp/net/ServerImplTest.cpp | 3 ++- ntcore/src/test/native/cpp/net/WireDecoderTest.cpp | 2 +- ntcore/src/test/native/cpp/net/WireEncoderTest.cpp | 2 +- ntcore/src/test/native/cpp/net3/WireDecoder3Test.cpp | 3 ++- ntcore/src/test/native/cpp/net3/WireEncoder3Test.cpp | 2 +- .../src/test/native/cpp/DSCommPacketTest.cpp | 3 ++- .../halsim_ds_socket/src/test/native/cpp/main.cpp | 3 +-- simulation/halsim_gui/src/test/native/cpp/main.cpp | 3 +-- .../halsim_ws_server/src/test/native/cpp/main.cpp | 2 +- wpilibNewCommands/.styleguide | 1 + .../test/native/cpp/frc2/command/CommandTestBase.h | 2 +- .../native/cpp/frc2/command/CompositionTestBase.h | 3 ++- .../frc2/command/MecanumControllerCommandTest.cpp | 2 +- .../test/native/cpp/frc2/command/POVButtonTest.cpp | 2 +- .../cpp/frc2/command/SchedulingRecursionTest.cpp | 3 ++- .../cpp/frc2/command/SwerveControllerCommandTest.cpp | 2 +- .../cpp/frc2/command/button/NetworkButtonTest.cpp | 2 +- .../native/cpp/frc2/command/button/TriggerTest.cpp | 2 +- wpilibNewCommands/src/test/native/cpp/main.cpp | 3 +-- .../src/test/native/cpp/AnalogPotentiometerTest.cpp | 2 +- .../src/test/native/cpp/DoubleSolenoidTestCTRE.cpp | 2 +- .../src/test/native/cpp/DoubleSolenoidTestREV.cpp | 2 +- wpilibc/src/test/native/cpp/DriverStationTest.cpp | 3 ++- wpilibc/src/test/native/cpp/InterruptTest.cpp | 2 +- wpilibc/src/test/native/cpp/JoystickTest.cpp | 3 ++- wpilibc/src/test/native/cpp/NotifierTest.cpp | 3 ++- wpilibc/src/test/native/cpp/PS4ControllerTest.cpp | 3 ++- wpilibc/src/test/native/cpp/ScopedTracerTest.cpp | 2 +- wpilibc/src/test/native/cpp/SolenoidTestCTRE.cpp | 2 +- wpilibc/src/test/native/cpp/SolenoidTestREV.cpp | 2 +- wpilibc/src/test/native/cpp/TimedRobotTest.cpp | 3 ++- wpilibc/src/test/native/cpp/TimerTest.cpp | 3 ++- wpilibc/src/test/native/cpp/TimesliceRobotTest.cpp | 3 ++- wpilibc/src/test/native/cpp/UltrasonicTest.cpp | 3 ++- .../src/test/native/cpp/UnitNetworkTablesTest.cpp | 3 +-- wpilibc/src/test/native/cpp/WatchdogTest.cpp | 3 ++- wpilibc/src/test/native/cpp/XboxControllerTest.cpp | 3 ++- .../test/native/cpp/drive/DifferentialDriveTest.cpp | 3 ++- .../src/test/native/cpp/drive/MecanumDriveTest.cpp | 3 ++- .../native/cpp/event/NetworkBooleanEventTest.cpp | 2 +- wpilibc/src/test/native/cpp/main.cpp | 3 +-- .../cpp/motorcontrol/MotorControllerGroupTest.cpp | 3 ++- .../cpp/shuffleboard/ShuffleboardInstanceTest.cpp | 2 +- .../native/cpp/shuffleboard/ShuffleboardTest.cpp | 3 ++- .../cpp/shuffleboard/SuppliedValueWidgetTest.cpp | 2 +- .../test/native/cpp/simulation/ADXL345SimTest.cpp | 2 +- .../test/native/cpp/simulation/ADXL362SimTest.cpp | 2 +- .../native/cpp/simulation/ADXRS450_GyroSimTest.cpp | 2 +- .../native/cpp/simulation/AccelerometerSimTest.cpp | 2 +- .../native/cpp/simulation/AddressableLEDSimTest.cpp | 2 +- .../native/cpp/simulation/AnalogEncoderSimTest.cpp | 2 +- .../test/native/cpp/simulation/AnalogGyroSimTest.cpp | 2 +- .../native/cpp/simulation/AnalogInputSimTest.cpp | 2 +- .../native/cpp/simulation/AnalogOutputSimTest.cpp | 2 +- .../native/cpp/simulation/AnalogTriggerSimTest.cpp | 2 +- .../test/native/cpp/simulation/CTREPCMSimTest.cpp | 2 +- .../test/native/cpp/simulation/DCMotorSimTest.cpp | 3 ++- .../src/test/native/cpp/simulation/DIOSimTest.cpp | 2 +- .../cpp/simulation/DifferentialDrivetrainSimTest.cpp | 2 +- .../test/native/cpp/simulation/DigitalPWMSimTest.cpp | 2 +- .../native/cpp/simulation/DriverStationSimTest.cpp | 3 ++- .../cpp/simulation/DutyCycleEncoderSimTest.cpp | 2 +- .../test/native/cpp/simulation/DutyCycleSimTest.cpp | 2 +- .../test/native/cpp/simulation/ElevatorSimTest.cpp | 2 +- .../test/native/cpp/simulation/EncoderSimTest.cpp | 2 +- .../src/test/native/cpp/simulation/PDPSimTest.cpp | 2 +- .../src/test/native/cpp/simulation/PWMSimTest.cpp | 2 +- .../src/test/native/cpp/simulation/REVPHSimTest.cpp | 2 +- .../src/test/native/cpp/simulation/RelaySimTest.cpp | 2 +- .../test/native/cpp/simulation/RoboRioSimTest.cpp | 2 +- .../test/native/cpp/simulation/SimDeviceSimTest.cpp | 2 +- .../native/cpp/simulation/SimInitializationTest.cpp | 2 +- .../cpp/simulation/SingleJointedArmSimTest.cpp | 3 ++- .../test/native/cpp/simulation/StateSpaceSimTest.cpp | 2 +- .../cpp/smartdashboard/SendableChooserTest.cpp | 3 +-- wpilibcExamples/.styleguide | 1 + .../cpp/examples/AddressableLED/cpp/RainbowTest.cpp | 3 +-- .../test/cpp/examples/AddressableLED/cpp/main.cpp | 3 +-- .../examples/ArmSimulation/cpp/ArmSimulationTest.cpp | 3 +-- .../src/test/cpp/examples/ArmSimulation/cpp/main.cpp | 3 +-- .../cpp/DigitalCommunicationTest.cpp | 3 +-- .../cpp/examples/DigitalCommunication/cpp/main.cpp | 3 +-- .../cpp/ElevatorSimulationTest.cpp | 3 +-- .../cpp/examples/ElevatorSimulation/cpp/main.cpp | 3 +-- .../I2CCommunication/cpp/I2CCommunicationTest.cpp | 3 +-- .../test/cpp/examples/I2CCommunication/cpp/main.cpp | 3 +-- .../PotentiometerPID/cpp/PotentiometerPIDTest.cpp | 3 +-- .../test/cpp/examples/PotentiometerPID/cpp/main.cpp | 3 +-- .../examples/UltrasonicPID/cpp/UltrasonicPIDTest.cpp | 3 +-- .../src/test/cpp/examples/UltrasonicPID/cpp/main.cpp | 3 +-- .../src/test/cpp/examples/UnitTest/cpp/main.cpp | 3 +-- .../examples/UnitTest/cpp/subsystems/IntakeTest.cpp | 3 +-- .../src/main/native/cpp/AnalogLoopTest.cpp | 2 +- .../src/main/native/cpp/AnalogPotentiometerTest.cpp | 3 ++- .../src/main/native/cpp/BuiltInAccelerometerTest.cpp | 3 ++- .../src/main/native/cpp/CounterTest.cpp | 2 +- .../src/main/native/cpp/DIOLoopTest.cpp | 2 +- .../src/main/native/cpp/DMATest.cpp | 3 ++- .../src/main/native/cpp/DigitalGlitchFilterTest.cpp | 3 ++- .../src/main/native/cpp/DriverStationTest.cpp | 2 +- .../src/main/native/cpp/FakeEncoderTest.cpp | 2 +- wpilibcIntegrationTests/src/main/native/cpp/Main.cpp | 2 +- .../src/main/native/cpp/MotorEncoderTest.cpp | 2 +- .../src/main/native/cpp/MotorInvertingTest.cpp | 2 +- .../src/main/native/cpp/NotifierTest.cpp | 2 +- .../src/main/native/cpp/PCMTest.cpp | 3 ++- .../main/native/cpp/PowerDistributionPanelTest.cpp | 2 +- .../src/main/native/cpp/PreferencesTest.cpp | 2 +- .../src/main/native/cpp/PriorityTest.cpp | 2 +- .../src/main/native/cpp/RelayTest.cpp | 2 +- .../src/main/native/cpp/TestEnvironment.cpp | 2 +- .../src/main/native/cpp/TiltPanCameraTest.cpp | 2 +- .../src/main/native/cpp/TimerTest.cpp | 3 +-- wpimath/.styleguide | 8 ++++---- .../DifferentialDriveAccelerationLimiter.cpp | 2 +- .../controller/LTVDifferentialDriveController.cpp | 3 ++- .../native/cpp/controller/LTVUnicycleController.cpp | 3 ++- .../main/native/cpp/geometry/CoordinateSystem.cpp | 2 +- wpimath/src/main/native/cpp/geometry/Rotation3d.cpp | 6 +++--- wpimath/src/main/native/cpp/jni/WPIMathJNI.cpp | 8 ++++---- wpimath/src/main/native/include/frc/DARE.h | 7 ++++--- wpimath/src/main/native/include/frc/EigenCore.h | 2 +- wpimath/src/main/native/include/frc/StateSpaceUtil.h | 4 ++-- .../ControlAffinePlantInversionFeedforward.h | 3 ++- .../DifferentialDriveAccelerationLimiter.h | 2 +- .../include/frc/controller/ImplicitModelFollower.h | 3 ++- .../frc/controller/LinearPlantInversionFeedforward.h | 3 ++- .../frc/controller/LinearQuadraticRegulator.inc | 5 +++-- .../include/frc/estimator/ExtendedKalmanFilter.inc | 3 ++- .../native/include/frc/estimator/KalmanFilter.inc | 3 ++- .../include/frc/estimator/UnscentedKalmanFilter.inc | 3 ++- .../include/frc/estimator/UnscentedTransform.h | 3 ++- .../main/native/include/frc/filter/LinearFilter.h | 2 +- wpimath/src/main/native/include/frc/fmt/Eigen.h | 5 ++--- .../include/frc/kinematics/MecanumDriveKinematics.h | 2 +- .../include/frc/kinematics/SwerveDriveKinematics.h | 2 +- .../main/native/include/frc/system/Discretization.h | 3 ++- .../native/include/frc/system/NumericalIntegration.h | 3 ++- .../src/test/native/cpp/ComputerVisionUtilTest.cpp | 3 ++- wpimath/src/test/native/cpp/DARETest.cpp | 5 +++-- wpimath/src/test/native/cpp/DARETestUtil.cpp | 4 ++-- wpimath/src/test/native/cpp/DARETestUtil.h | 2 +- wpimath/src/test/native/cpp/EigenTest.cpp | 5 +++-- wpimath/src/test/native/cpp/FormatterTest.cpp | 2 +- wpimath/src/test/native/cpp/MathUtilTest.cpp | 3 ++- wpimath/src/test/native/cpp/StateSpaceTest.cpp | 4 ++-- wpimath/src/test/native/cpp/StateSpaceUtilTest.cpp | 4 ++-- wpimath/src/test/native/cpp/UnitsTest.cpp | 3 ++- .../cpp/controller/BangBangInputOutputTest.cpp | 3 ++- .../native/cpp/controller/BangBangToleranceTest.cpp | 3 ++- .../ControlAffinePlantInversionFeedforwardTest.cpp | 4 ++-- .../controller/DifferentialDriveFeedforwardTest.cpp | 4 ++-- .../cpp/controller/HolonomicDriveControllerTest.cpp | 3 ++- .../LTVDifferentialDriveControllerTest.cpp | 3 ++- .../cpp/controller/LTVUnicycleControllerTest.cpp | 3 ++- .../LinearPlantInversionFeedforwardTest.cpp | 4 ++-- .../cpp/controller/LinearQuadraticRegulatorTest.cpp | 4 ++-- .../native/cpp/controller/PIDInputOutputTest.cpp | 3 ++- .../test/native/cpp/controller/PIDToleranceTest.cpp | 3 ++- .../cpp/controller/ProfiledPIDInputOutputTest.cpp | 3 ++- .../native/cpp/controller/RamseteControllerTest.cpp | 3 ++- .../cpp/controller/SimpleMotorFeedforwardTest.cpp | 4 ++-- .../native/cpp/estimator/AngleStatisticsTest.cpp | 4 ++-- .../estimator/DifferentialDrivePoseEstimatorTest.cpp | 4 +++- .../cpp/estimator/ExtendedKalmanFilterTest.cpp | 6 +++--- .../test/native/cpp/estimator/KalmanFilterTest.cpp | 6 +++--- .../cpp/estimator/MecanumDrivePoseEstimatorTest.cpp | 4 +++- .../cpp/estimator/SwerveDrivePoseEstimatorTest.cpp | 3 ++- .../cpp/estimator/UnscentedKalmanFilterTest.cpp | 6 +++--- wpimath/src/test/native/cpp/filter/DebouncerTest.cpp | 2 +- .../test/native/cpp/filter/LinearFilterNoiseTest.cpp | 3 ++- .../native/cpp/filter/LinearFilterOutputTest.cpp | 2 +- .../src/test/native/cpp/filter/MedianFilterTest.cpp | 3 ++- .../test/native/cpp/filter/SlewRateLimiterTest.cpp | 2 +- .../native/cpp/geometry/CoordinateSystemTest.cpp | 3 ++- wpimath/src/test/native/cpp/geometry/Pose2dTest.cpp | 3 ++- wpimath/src/test/native/cpp/geometry/Pose3dTest.cpp | 2 +- .../src/test/native/cpp/geometry/QuaternionTest.cpp | 3 ++- .../src/test/native/cpp/geometry/Rotation2dTest.cpp | 3 ++- .../src/test/native/cpp/geometry/Rotation3dTest.cpp | 2 +- .../src/test/native/cpp/geometry/Transform2dTest.cpp | 3 ++- .../src/test/native/cpp/geometry/Transform3dTest.cpp | 3 ++- .../test/native/cpp/geometry/Translation2dTest.cpp | 3 ++- .../test/native/cpp/geometry/Translation3dTest.cpp | 3 ++- wpimath/src/test/native/cpp/geometry/Twist2dTest.cpp | 3 ++- wpimath/src/test/native/cpp/geometry/Twist3dTest.cpp | 3 ++- .../interpolation/TimeInterpolatableBufferTest.cpp | 3 ++- .../test/native/cpp/kinematics/ChassisSpeedsTest.cpp | 3 ++- .../kinematics/DifferentialDriveKinematicsTest.cpp | 3 ++- .../cpp/kinematics/DifferentialDriveOdometryTest.cpp | 3 ++- .../cpp/kinematics/MecanumDriveKinematicsTest.cpp | 3 ++- .../cpp/kinematics/MecanumDriveOdometryTest.cpp | 3 ++- .../cpp/kinematics/SwerveDriveKinematicsTest.cpp | 3 ++- .../cpp/kinematics/SwerveDriveOdometryTest.cpp | 3 ++- .../cpp/kinematics/SwerveModulePositionTest.cpp | 3 ++- .../native/cpp/kinematics/SwerveModuleStateTest.cpp | 3 ++- wpimath/src/test/native/cpp/main.cpp | 2 +- .../native/cpp/spline/CubicHermiteSplineTest.cpp | 3 ++- .../native/cpp/spline/QuinticHermiteSplineTest.cpp | 3 ++- .../test/native/cpp/system/DiscretizationTest.cpp | 6 +++--- .../test/native/cpp/system/LinearSystemIDTest.cpp | 1 + .../native/cpp/system/NumericalIntegrationTest.cpp | 4 ++-- .../native/cpp/system/RungeKuttaTimeVaryingTest.cpp | 4 ++-- .../CentripetalAccelerationConstraintTest.cpp | 3 ++- .../trajectory/DifferentialDriveKinematicsTest.cpp | 3 ++- .../cpp/trajectory/DifferentialDriveVoltageTest.cpp | 3 ++- .../trajectory/EllipticalRegionConstraintTest.cpp | 3 ++- .../trajectory/RectangularRegionConstraintTest.cpp | 3 ++- .../cpp/trajectory/TrajectoryConcatenateTest.cpp | 3 ++- .../cpp/trajectory/TrajectoryGeneratorTest.cpp | 3 ++- .../native/cpp/trajectory/TrajectoryJsonTest.cpp | 3 ++- .../cpp/trajectory/TrajectoryTransformTest.cpp | 3 ++- .../native/cpp/trajectory/TrapezoidProfileTest.cpp | 3 ++- wpinet/.styleguide | 1 + wpinet/src/test/native/cpp/HttpParserTest.cpp | 2 +- wpinet/src/test/native/cpp/HttpUtilTest.cpp | 2 +- wpinet/src/test/native/cpp/MulticastTest.cpp | 3 +-- wpinet/src/test/native/cpp/WebSocketTest.h | 3 ++- wpinet/src/test/native/cpp/WorkerThreadTest.cpp | 3 +-- wpinet/src/test/native/cpp/hostname.cpp | 3 +-- wpinet/src/test/native/cpp/main.cpp | 2 +- wpinet/src/test/native/cpp/raw_uv_stream_test.cpp | 2 +- .../src/test/native/cpp/uv/UvAsyncFunctionTest.cpp | 4 ++-- wpinet/src/test/native/cpp/uv/UvAsyncTest.cpp | 3 +-- wpinet/src/test/native/cpp/uv/UvBufferTest.cpp | 2 +- wpinet/src/test/native/cpp/uv/UvGetAddrInfoTest.cpp | 2 +- wpinet/src/test/native/cpp/uv/UvGetNameInfoTest.cpp | 2 +- wpinet/src/test/native/cpp/uv/UvLoopWalkTest.cpp | 2 +- wpinet/src/test/native/cpp/uv/UvTimerTest.cpp | 2 +- wpiutil/.styleguide | 5 +++++ wpiutil/examples/printlog/printlog.cpp | 5 +++-- wpiutil/examples/writelog/writelog.cpp | 3 ++- wpiutil/src/dev/native/cpp/main.cpp | 3 ++- wpiutil/src/main/native/cpp/DataLog.cpp | 3 ++- wpiutil/src/main/native/cpp/jni/DataLogJNI.cpp | 3 ++- wpiutil/src/main/native/cpp/jni/WPIUtilJNI.cpp | 3 ++- .../main/native/cpp/sendable/SendableRegistry.cpp | 3 ++- wpiutil/src/main/native/cpp/timestamp.cpp | 2 +- wpiutil/src/main/native/include/wpi/Logger.h | 2 +- .../src/main/native/include/wpi/fmt/raw_ostream.h | 3 ++- wpiutil/src/test/native/cpp/ArrayTest.cpp | 3 ++- wpiutil/src/test/native/cpp/Base64Test.cpp | 3 ++- wpiutil/src/test/native/cpp/CircularBufferTest.cpp | 2 +- wpiutil/src/test/native/cpp/ScopeExitTest.cpp | 3 ++- .../src/test/native/cpp/StaticCircularBufferTest.cpp | 2 +- wpiutil/src/test/native/cpp/SynchronizationTest.cpp | 2 +- wpiutil/src/test/native/cpp/UidVectorTest.cpp | 2 +- wpiutil/src/test/native/cpp/UnescapeCStringTest.cpp | 3 ++- wpiutil/src/test/native/cpp/ct_string_test.cpp | 2 +- wpiutil/src/test/native/cpp/future_test.cpp | 4 ++-- wpiutil/src/test/native/cpp/json/unit-algorithms.cpp | 7 ++++--- wpiutil/src/test/native/cpp/json/unit-capacity.cpp | 5 +++-- wpiutil/src/test/native/cpp/json/unit-cbor.cpp | 7 +++---- wpiutil/src/test/native/cpp/json/unit-comparison.cpp | 5 +++-- wpiutil/src/test/native/cpp/json/unit-concepts.cpp | 5 +++-- .../src/test/native/cpp/json/unit-constructor1.cpp | 5 +++-- .../src/test/native/cpp/json/unit-constructor2.cpp | 5 +++-- .../src/test/native/cpp/json/unit-conversions.cpp | 9 +++++---- .../test/native/cpp/json/unit-deserialization.cpp | 10 ++++++---- .../test/native/cpp/json/unit-element_access1.cpp | 5 +++-- .../test/native/cpp/json/unit-element_access2.cpp | 4 ++-- wpiutil/src/test/native/cpp/json/unit-inspection.cpp | 5 +++-- wpiutil/src/test/native/cpp/json/unit-iterators1.cpp | 5 +++-- wpiutil/src/test/native/cpp/json/unit-iterators2.cpp | 5 +++-- .../src/test/native/cpp/json/unit-json_pointer.cpp | 5 +++-- wpiutil/src/test/native/cpp/json/unit-meta.cpp | 5 +++-- wpiutil/src/test/native/cpp/json/unit-modifiers.cpp | 5 +++-- wpiutil/src/test/native/cpp/json/unit-msgpack.cpp | 7 ++++--- .../src/test/native/cpp/json/unit-pointer_access.cpp | 4 ++-- wpiutil/src/test/native/cpp/json/unit-readme.cpp | 7 ++++--- .../test/native/cpp/json/unit-reference_access.cpp | 5 +++-- wpiutil/src/test/native/cpp/json/unit-unicode.cpp | 11 ++++++----- wpiutil/src/test/native/cpp/leb128Test.cpp | 3 ++- wpiutil/src/test/native/cpp/main.cpp | 2 +- wpiutil/src/test/native/cpp/priority_mutex_test.cpp | 2 +- wpiutil/src/test/native/cpp/sha1Test.cpp | 3 ++- .../src/test/native/cpp/sigslot/function-traits.cpp | 4 ++-- wpiutil/src/test/native/cpp/sigslot/recursive.cpp | 2 +- .../src/test/native/cpp/sigslot/signal-extended.cpp | 2 +- .../src/test/native/cpp/sigslot/signal-threaded.cpp | 4 ++-- .../src/test/native/cpp/sigslot/signal-tracking.cpp | 4 ++-- wpiutil/src/test/native/cpp/sigslot/signal.cpp | 4 ++-- wpiutil/src/test/native/cpp/spinlock_bench.cpp | 5 +++-- 329 files changed, 559 insertions(+), 435 deletions(-) diff --git a/.styleguide b/.styleguide index 9df73f7ec1..02e7254bba 100644 --- a/.styleguide +++ b/.styleguide @@ -29,8 +29,8 @@ includeOtherLibs { ^Eigen/ ^cameraserver/ ^cscore - ^drake/ ^fmt/ + ^gtest/ ^hal/ ^imgui ^implot diff --git a/apriltag/src/test/native/cpp/AprilTagDetectorTest.cpp b/apriltag/src/test/native/cpp/AprilTagDetectorTest.cpp index 8f93bb3b02..ab43563a6e 100644 --- a/apriltag/src/test/native/cpp/AprilTagDetectorTest.cpp +++ b/apriltag/src/test/native/cpp/AprilTagDetectorTest.cpp @@ -2,8 +2,9 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include + #include "frc/apriltag/AprilTagDetector.h" -#include "gtest/gtest.h" using namespace frc; diff --git a/apriltag/src/test/native/cpp/AprilTagJsonTest.cpp b/apriltag/src/test/native/cpp/AprilTagJsonTest.cpp index 157c40f466..4216479813 100644 --- a/apriltag/src/test/native/cpp/AprilTagJsonTest.cpp +++ b/apriltag/src/test/native/cpp/AprilTagJsonTest.cpp @@ -4,12 +4,12 @@ #include +#include #include #include "frc/apriltag/AprilTag.h" #include "frc/apriltag/AprilTagFieldLayout.h" #include "frc/geometry/Pose3d.h" -#include "gtest/gtest.h" using namespace frc; diff --git a/apriltag/src/test/native/cpp/AprilTagPoseSetOriginTest.cpp b/apriltag/src/test/native/cpp/AprilTagPoseSetOriginTest.cpp index 38496495b2..58fd873df3 100644 --- a/apriltag/src/test/native/cpp/AprilTagPoseSetOriginTest.cpp +++ b/apriltag/src/test/native/cpp/AprilTagPoseSetOriginTest.cpp @@ -4,12 +4,12 @@ #include +#include #include #include "frc/apriltag/AprilTag.h" #include "frc/apriltag/AprilTagFieldLayout.h" #include "frc/geometry/Pose3d.h" -#include "gtest/gtest.h" using namespace frc; diff --git a/apriltag/src/test/native/cpp/LoadConfigTest.cpp b/apriltag/src/test/native/cpp/LoadConfigTest.cpp index 9db61e950f..c3ff7c03c4 100644 --- a/apriltag/src/test/native/cpp/LoadConfigTest.cpp +++ b/apriltag/src/test/native/cpp/LoadConfigTest.cpp @@ -2,8 +2,9 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include + #include "frc/apriltag/AprilTagFields.h" -#include "gtest/gtest.h" namespace frc { diff --git a/apriltag/src/test/native/cpp/main.cpp b/apriltag/src/test/native/cpp/main.cpp index 09072ee347..e993c1f14e 100644 --- a/apriltag/src/test/native/cpp/main.cpp +++ b/apriltag/src/test/native/cpp/main.cpp @@ -2,7 +2,7 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include "gtest/gtest.h" +#include int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); diff --git a/cameraserver/.styleguide b/cameraserver/.styleguide index 63515d2920..951f083e20 100644 --- a/cameraserver/.styleguide +++ b/cameraserver/.styleguide @@ -13,6 +13,7 @@ repoRootNameOverride { includeOtherLibs { ^fmt/ + ^gtest/ ^hal/ ^networktables/ ^opencv2/ diff --git a/crossConnIntegrationTests/src/main/native/cpp/AnalogTest.cpp b/crossConnIntegrationTests/src/main/native/cpp/AnalogTest.cpp index 3423ffed1e..317342393f 100644 --- a/crossConnIntegrationTests/src/main/native/cpp/AnalogTest.cpp +++ b/crossConnIntegrationTests/src/main/native/cpp/AnalogTest.cpp @@ -2,13 +2,13 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include #include #include #include "CrossConnects.h" #include "LifetimeWrappers.h" -#include "gtest/gtest.h" using namespace hlt; diff --git a/crossConnIntegrationTests/src/main/native/cpp/DIOTest.cpp b/crossConnIntegrationTests/src/main/native/cpp/DIOTest.cpp index 84d2b9d022..c03b7b4435 100644 --- a/crossConnIntegrationTests/src/main/native/cpp/DIOTest.cpp +++ b/crossConnIntegrationTests/src/main/native/cpp/DIOTest.cpp @@ -2,12 +2,12 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include #include #include "CrossConnects.h" #include "LifetimeWrappers.h" -#include "gtest/gtest.h" using namespace hlt; diff --git a/crossConnIntegrationTests/src/main/native/cpp/DutyCycleTest.cpp b/crossConnIntegrationTests/src/main/native/cpp/DutyCycleTest.cpp index 9a93b5021f..3109926b3b 100644 --- a/crossConnIntegrationTests/src/main/native/cpp/DutyCycleTest.cpp +++ b/crossConnIntegrationTests/src/main/native/cpp/DutyCycleTest.cpp @@ -2,11 +2,11 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include #include "CrossConnects.h" #include "LifetimeWrappers.h" -#include "gtest/gtest.h" using namespace hlt; diff --git a/crossConnIntegrationTests/src/main/native/cpp/Main.cpp b/crossConnIntegrationTests/src/main/native/cpp/Main.cpp index 95bc5b5ec3..70e9d83a6e 100644 --- a/crossConnIntegrationTests/src/main/native/cpp/Main.cpp +++ b/crossConnIntegrationTests/src/main/native/cpp/Main.cpp @@ -2,7 +2,7 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include "gtest/gtest.h" +#include int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); diff --git a/crossConnIntegrationTests/src/main/native/cpp/PWMTest.cpp b/crossConnIntegrationTests/src/main/native/cpp/PWMTest.cpp index e59477a590..d209658c9c 100644 --- a/crossConnIntegrationTests/src/main/native/cpp/PWMTest.cpp +++ b/crossConnIntegrationTests/src/main/native/cpp/PWMTest.cpp @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -13,7 +14,6 @@ #include "CrossConnects.h" #include "LifetimeWrappers.h" -#include "gtest/gtest.h" using namespace hlt; diff --git a/crossConnIntegrationTests/src/main/native/cpp/RelayAnalogTest.cpp b/crossConnIntegrationTests/src/main/native/cpp/RelayAnalogTest.cpp index fc7da0c6fa..0ba1e2d2a3 100644 --- a/crossConnIntegrationTests/src/main/native/cpp/RelayAnalogTest.cpp +++ b/crossConnIntegrationTests/src/main/native/cpp/RelayAnalogTest.cpp @@ -2,13 +2,13 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include #include #include #include "CrossConnects.h" #include "LifetimeWrappers.h" -#include "gtest/gtest.h" using namespace hlt; diff --git a/crossConnIntegrationTests/src/main/native/cpp/RelayDigitalTest.cpp b/crossConnIntegrationTests/src/main/native/cpp/RelayDigitalTest.cpp index c7923bc1b2..54b39933c3 100644 --- a/crossConnIntegrationTests/src/main/native/cpp/RelayDigitalTest.cpp +++ b/crossConnIntegrationTests/src/main/native/cpp/RelayDigitalTest.cpp @@ -2,12 +2,12 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include #include #include "CrossConnects.h" #include "LifetimeWrappers.h" -#include "gtest/gtest.h" using namespace hlt; diff --git a/crossConnIntegrationTests/src/main/native/cpp/TestEnvironment.cpp b/crossConnIntegrationTests/src/main/native/cpp/TestEnvironment.cpp index 458046c87e..8ef1922717 100644 --- a/crossConnIntegrationTests/src/main/native/cpp/TestEnvironment.cpp +++ b/crossConnIntegrationTests/src/main/native/cpp/TestEnvironment.cpp @@ -6,9 +6,9 @@ #include #include +#include #include -#include "gtest/gtest.h" #include "mockds/MockDS.h" using namespace std::chrono_literals; diff --git a/cscore/.styleguide b/cscore/.styleguide index dadecd21e7..e82e06430e 100644 --- a/cscore/.styleguide +++ b/cscore/.styleguide @@ -36,6 +36,7 @@ repoRootNameOverride { includeOtherLibs { ^fmt/ + ^gtest/ ^opencv2/ ^support/ ^tcpsockets/ diff --git a/cscore/src/test/native/cpp/CameraSourceTest.cpp b/cscore/src/test/native/cpp/CameraSourceTest.cpp index 4c860bfc44..2e9d1d8810 100644 --- a/cscore/src/test/native/cpp/CameraSourceTest.cpp +++ b/cscore/src/test/native/cpp/CameraSourceTest.cpp @@ -2,8 +2,9 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include + #include "cscore.h" -#include "gtest/gtest.h" namespace cs { diff --git a/cscore/src/test/native/cpp/main.cpp b/cscore/src/test/native/cpp/main.cpp index 09072ee347..e993c1f14e 100644 --- a/cscore/src/test/native/cpp/main.cpp +++ b/cscore/src/test/native/cpp/main.cpp @@ -2,7 +2,7 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include "gtest/gtest.h" +#include int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); diff --git a/hal/.styleguide b/hal/.styleguide index 77cd815c74..bdd9bc47c3 100644 --- a/hal/.styleguide +++ b/hal/.styleguide @@ -32,6 +32,7 @@ includeOtherLibs { ^FRC_FPGA_ChipObject/ ^FRC_NetworkCommunication/ ^fmt/ + ^gtest/ ^i2clib/ ^llvm/ ^opencv2/ diff --git a/hal/src/test/native/cpp/HALTest.cpp b/hal/src/test/native/cpp/HALTest.cpp index 62a4f856d3..0c4939e214 100644 --- a/hal/src/test/native/cpp/HALTest.cpp +++ b/hal/src/test/native/cpp/HALTest.cpp @@ -2,7 +2,8 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include "gtest/gtest.h" +#include + #include "hal/HAL.h" namespace hal { diff --git a/hal/src/test/native/cpp/can/CANTest.cpp b/hal/src/test/native/cpp/can/CANTest.cpp index db9dbf5ab1..72a81cd9c1 100644 --- a/hal/src/test/native/cpp/can/CANTest.cpp +++ b/hal/src/test/native/cpp/can/CANTest.cpp @@ -2,7 +2,8 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include "gtest/gtest.h" +#include + #include "hal/CANAPI.h" #include "hal/HAL.h" #include "hal/simulation/CanData.h" diff --git a/hal/src/test/native/cpp/handles/HandleTest.cpp b/hal/src/test/native/cpp/handles/HandleTest.cpp index 5c98f7fc2a..d230a06bbd 100644 --- a/hal/src/test/native/cpp/handles/HandleTest.cpp +++ b/hal/src/test/native/cpp/handles/HandleTest.cpp @@ -2,7 +2,8 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include "gtest/gtest.h" +#include + #include "hal/HAL.h" #include "hal/handles/IndexedClassedHandleResource.h" diff --git a/hal/src/test/native/cpp/main.cpp b/hal/src/test/native/cpp/main.cpp index 7981c0491b..20ccbadad9 100644 --- a/hal/src/test/native/cpp/main.cpp +++ b/hal/src/test/native/cpp/main.cpp @@ -2,7 +2,8 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include "gtest/gtest.h" +#include + #include "hal/HAL.h" int main(int argc, char** argv) { diff --git a/hal/src/test/native/cpp/mockdata/AnalogInDataTest.cpp b/hal/src/test/native/cpp/mockdata/AnalogInDataTest.cpp index 284ebd6aca..e823375545 100644 --- a/hal/src/test/native/cpp/mockdata/AnalogInDataTest.cpp +++ b/hal/src/test/native/cpp/mockdata/AnalogInDataTest.cpp @@ -2,7 +2,8 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include "gtest/gtest.h" +#include + #include "hal/AnalogInput.h" #include "hal/HAL.h" #include "hal/handles/HandlesInternal.h" diff --git a/hal/src/test/native/cpp/mockdata/AnalogOutDataTest.cpp b/hal/src/test/native/cpp/mockdata/AnalogOutDataTest.cpp index 15a5fa610c..11dad05797 100644 --- a/hal/src/test/native/cpp/mockdata/AnalogOutDataTest.cpp +++ b/hal/src/test/native/cpp/mockdata/AnalogOutDataTest.cpp @@ -2,7 +2,8 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include "gtest/gtest.h" +#include + #include "hal/AnalogOutput.h" #include "hal/HAL.h" #include "hal/handles/HandlesInternal.h" diff --git a/hal/src/test/native/cpp/mockdata/DIODataTest.cpp b/hal/src/test/native/cpp/mockdata/DIODataTest.cpp index e8ab350c68..35bfac5a37 100644 --- a/hal/src/test/native/cpp/mockdata/DIODataTest.cpp +++ b/hal/src/test/native/cpp/mockdata/DIODataTest.cpp @@ -2,7 +2,8 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include "gtest/gtest.h" +#include + #include "hal/DIO.h" #include "hal/HAL.h" #include "hal/handles/HandlesInternal.h" diff --git a/hal/src/test/native/cpp/mockdata/DriverStationDataTest.cpp b/hal/src/test/native/cpp/mockdata/DriverStationDataTest.cpp index 59658cbaa1..642136c709 100644 --- a/hal/src/test/native/cpp/mockdata/DriverStationDataTest.cpp +++ b/hal/src/test/native/cpp/mockdata/DriverStationDataTest.cpp @@ -4,7 +4,8 @@ #include -#include "gtest/gtest.h" +#include + #include "hal/HAL.h" #include "hal/simulation/DriverStationData.h" diff --git a/hal/src/test/native/cpp/mockdata/I2CDataTest.cpp b/hal/src/test/native/cpp/mockdata/I2CDataTest.cpp index 7678a4aa00..af4499b88f 100644 --- a/hal/src/test/native/cpp/mockdata/I2CDataTest.cpp +++ b/hal/src/test/native/cpp/mockdata/I2CDataTest.cpp @@ -2,7 +2,8 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include "gtest/gtest.h" +#include + #include "hal/HAL.h" #include "hal/I2C.h" #include "hal/handles/HandlesInternal.h" diff --git a/hal/src/test/native/cpp/mockdata/PCMDataTest.cpp b/hal/src/test/native/cpp/mockdata/PCMDataTest.cpp index 58a94c0719..70a36a9b35 100644 --- a/hal/src/test/native/cpp/mockdata/PCMDataTest.cpp +++ b/hal/src/test/native/cpp/mockdata/PCMDataTest.cpp @@ -2,7 +2,8 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include "gtest/gtest.h" +#include + #include "hal/CTREPCM.h" #include "hal/HAL.h" #include "hal/handles/HandlesInternal.h" diff --git a/hal/src/test/native/cpp/mockdata/PDPDataTest.cpp b/hal/src/test/native/cpp/mockdata/PDPDataTest.cpp index 59b3ea4098..2e9977f0ae 100644 --- a/hal/src/test/native/cpp/mockdata/PDPDataTest.cpp +++ b/hal/src/test/native/cpp/mockdata/PDPDataTest.cpp @@ -2,7 +2,8 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include "gtest/gtest.h" +#include + #include "hal/HAL.h" #include "hal/PowerDistribution.h" #include "hal/handles/HandlesInternal.h" diff --git a/hal/src/test/native/cpp/mockdata/PWMDataTest.cpp b/hal/src/test/native/cpp/mockdata/PWMDataTest.cpp index ab14704da7..b32e0a03c5 100644 --- a/hal/src/test/native/cpp/mockdata/PWMDataTest.cpp +++ b/hal/src/test/native/cpp/mockdata/PWMDataTest.cpp @@ -2,7 +2,8 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include "gtest/gtest.h" +#include + #include "hal/HAL.h" #include "hal/PWM.h" #include "hal/handles/HandlesInternal.h" diff --git a/hal/src/test/native/cpp/mockdata/RelayDataTest.cpp b/hal/src/test/native/cpp/mockdata/RelayDataTest.cpp index eef8631d71..e4017ca454 100644 --- a/hal/src/test/native/cpp/mockdata/RelayDataTest.cpp +++ b/hal/src/test/native/cpp/mockdata/RelayDataTest.cpp @@ -2,7 +2,8 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include "gtest/gtest.h" +#include + #include "hal/HAL.h" #include "hal/Relay.h" #include "hal/handles/HandlesInternal.h" diff --git a/hal/src/test/native/cpp/mockdata/SPIDataTest.cpp b/hal/src/test/native/cpp/mockdata/SPIDataTest.cpp index c427eaff8a..1ae626072f 100644 --- a/hal/src/test/native/cpp/mockdata/SPIDataTest.cpp +++ b/hal/src/test/native/cpp/mockdata/SPIDataTest.cpp @@ -2,7 +2,8 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include "gtest/gtest.h" +#include + #include "hal/HAL.h" #include "hal/SPI.h" #include "hal/handles/HandlesInternal.h" diff --git a/hal/src/test/native/cpp/mockdata/SimDeviceDataTest.cpp b/hal/src/test/native/cpp/mockdata/SimDeviceDataTest.cpp index 1203fd7c9c..fef7adaa24 100644 --- a/hal/src/test/native/cpp/mockdata/SimDeviceDataTest.cpp +++ b/hal/src/test/native/cpp/mockdata/SimDeviceDataTest.cpp @@ -2,7 +2,8 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include "gtest/gtest.h" +#include + #include "hal/SimDevice.h" #include "hal/simulation/SimDeviceData.h" diff --git a/imgui/.styleguide b/imgui/.styleguide index 5e97ca43ad..054020f7fd 100644 --- a/imgui/.styleguide +++ b/imgui/.styleguide @@ -6,15 +6,3 @@ cppHeaderFileInclude { cppSrcFileInclude { \.cpp$ } - -modifiableFileExclude { -} - -generatedFileExclude { -} - -repoRootNameOverride { -} - -includeOtherLibs { -} diff --git a/ntcore/.styleguide b/ntcore/.styleguide index ef9cbb7ca1..1808bb50ce 100644 --- a/ntcore/.styleguide +++ b/ntcore/.styleguide @@ -28,6 +28,7 @@ includeGuardRoots { includeOtherLibs { ^fmt/ + ^gtest/ ^support/ ^wpi/ ^wpinet/ diff --git a/ntcore/src/test/native/cpp/ConnectionListenerTest.cpp b/ntcore/src/test/native/cpp/ConnectionListenerTest.cpp index 15612773b7..3e4dd24fcb 100644 --- a/ntcore/src/test/native/cpp/ConnectionListenerTest.cpp +++ b/ntcore/src/test/native/cpp/ConnectionListenerTest.cpp @@ -5,11 +5,11 @@ #include #include +#include #include #include #include "TestPrinters.h" -#include "gtest/gtest.h" #include "ntcore_cpp.h" class ConnectionListenerTest : public ::testing::Test { diff --git a/ntcore/src/test/native/cpp/LocalStorageTest.cpp b/ntcore/src/test/native/cpp/LocalStorageTest.cpp index ccdb26ed39..0aee590f54 100644 --- a/ntcore/src/test/native/cpp/LocalStorageTest.cpp +++ b/ntcore/src/test/native/cpp/LocalStorageTest.cpp @@ -2,6 +2,8 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include + #include "LocalStorage.h" #include "MockListenerStorage.h" #include "MockLogger.h" @@ -10,7 +12,6 @@ #include "TestPrinters.h" #include "ValueMatcher.h" #include "gmock/gmock.h" -#include "gtest/gtest.h" #include "net/MockNetworkInterface.h" #include "ntcore_c.h" #include "ntcore_cpp.h" diff --git a/ntcore/src/test/native/cpp/LoggerTest.cpp b/ntcore/src/test/native/cpp/LoggerTest.cpp index a9f499c7ac..9e974c3fa7 100644 --- a/ntcore/src/test/native/cpp/LoggerTest.cpp +++ b/ntcore/src/test/native/cpp/LoggerTest.cpp @@ -2,11 +2,11 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include #include "Handle.h" #include "TestPrinters.h" -#include "gtest/gtest.h" #include "ntcore_cpp.h" class LoggerTest : public ::testing::Test { diff --git a/ntcore/src/test/native/cpp/NetworkTableTest.cpp b/ntcore/src/test/native/cpp/NetworkTableTest.cpp index aa28afd664..4429c8979c 100644 --- a/ntcore/src/test/native/cpp/NetworkTableTest.cpp +++ b/ntcore/src/test/native/cpp/NetworkTableTest.cpp @@ -2,8 +2,9 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include + #include "TestPrinters.h" -#include "gtest/gtest.h" #include "networktables/NetworkTable.h" #include "networktables/NetworkTableInstance.h" diff --git a/ntcore/src/test/native/cpp/TableListenerTest.cpp b/ntcore/src/test/native/cpp/TableListenerTest.cpp index 7fb19476d2..70adf11e30 100644 --- a/ntcore/src/test/native/cpp/TableListenerTest.cpp +++ b/ntcore/src/test/native/cpp/TableListenerTest.cpp @@ -4,9 +4,10 @@ #include +#include + #include "TestPrinters.h" #include "gmock/gmock.h" -#include "gtest/gtest.h" #include "networktables/DoubleTopic.h" #include "networktables/NetworkTableInstance.h" #include "ntcore_cpp.h" diff --git a/ntcore/src/test/native/cpp/TestPrinters.h b/ntcore/src/test/native/cpp/TestPrinters.h index 2b8f1da979..ac0229d621 100644 --- a/ntcore/src/test/native/cpp/TestPrinters.h +++ b/ntcore/src/test/native/cpp/TestPrinters.h @@ -9,7 +9,7 @@ #include #include -#include "gtest/gtest.h" +#include namespace wpi { diff --git a/ntcore/src/test/native/cpp/TimeSyncTest.cpp b/ntcore/src/test/native/cpp/TimeSyncTest.cpp index 54e1f7c8aa..1820b37ff4 100644 --- a/ntcore/src/test/native/cpp/TimeSyncTest.cpp +++ b/ntcore/src/test/native/cpp/TimeSyncTest.cpp @@ -2,7 +2,8 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include "gtest/gtest.h" +#include + #include "networktables/NetworkTableInstance.h" #include "networktables/NetworkTableListener.h" diff --git a/ntcore/src/test/native/cpp/TopicListenerTest.cpp b/ntcore/src/test/native/cpp/TopicListenerTest.cpp index f0a002a49c..8f46742a85 100644 --- a/ntcore/src/test/native/cpp/TopicListenerTest.cpp +++ b/ntcore/src/test/native/cpp/TopicListenerTest.cpp @@ -5,12 +5,12 @@ #include #include +#include #include #include #include "TestPrinters.h" #include "ValueMatcher.h" -#include "gtest/gtest.h" #include "ntcore_c.h" #include "ntcore_cpp.h" diff --git a/ntcore/src/test/native/cpp/ValueListenerTest.cpp b/ntcore/src/test/native/cpp/ValueListenerTest.cpp index dbe3201389..83ef6d812e 100644 --- a/ntcore/src/test/native/cpp/ValueListenerTest.cpp +++ b/ntcore/src/test/native/cpp/ValueListenerTest.cpp @@ -2,12 +2,12 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include #include #include "TestPrinters.h" #include "ValueMatcher.h" -#include "gtest/gtest.h" #include "ntcore_c.h" #include "ntcore_cpp.h" diff --git a/ntcore/src/test/native/cpp/ValueTest.cpp b/ntcore/src/test/native/cpp/ValueTest.cpp index 7283b1e9f4..ba99782ff6 100644 --- a/ntcore/src/test/native/cpp/ValueTest.cpp +++ b/ntcore/src/test/native/cpp/ValueTest.cpp @@ -5,9 +5,10 @@ #include #include +#include + #include "TestPrinters.h" #include "Value_internal.h" -#include "gtest/gtest.h" #include "networktables/NetworkTableValue.h" using namespace std::string_view_literals; diff --git a/ntcore/src/test/native/cpp/net/ServerImplTest.cpp b/ntcore/src/test/native/cpp/net/ServerImplTest.cpp index 68c7564283..c8f876b162 100644 --- a/ntcore/src/test/native/cpp/net/ServerImplTest.cpp +++ b/ntcore/src/test/native/cpp/net/ServerImplTest.cpp @@ -9,6 +9,8 @@ #include #include +#include + #include "../MockLogger.h" #include "../PubSubOptionsMatcher.h" #include "../SpanMatcher.h" @@ -18,7 +20,6 @@ #include "MockNetworkInterface.h" #include "MockWireConnection.h" #include "gmock/gmock.h" -#include "gtest/gtest.h" #include "net/Message.h" #include "net/ServerImpl.h" #include "net/WireEncoder.h" diff --git a/ntcore/src/test/native/cpp/net/WireDecoderTest.cpp b/ntcore/src/test/native/cpp/net/WireDecoderTest.cpp index f89330229a..edff0839e9 100644 --- a/ntcore/src/test/native/cpp/net/WireDecoderTest.cpp +++ b/ntcore/src/test/native/cpp/net/WireDecoderTest.cpp @@ -2,6 +2,7 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include #include @@ -9,7 +10,6 @@ #include "../TestPrinters.h" #include "Handle.h" #include "gmock/gmock.h" -#include "gtest/gtest.h" #include "net/Message.h" #include "net/WireDecoder.h" #include "networktables/NetworkTableValue.h" diff --git a/ntcore/src/test/native/cpp/net/WireEncoderTest.cpp b/ntcore/src/test/native/cpp/net/WireEncoderTest.cpp index 883b15e1dd..44915d6398 100644 --- a/ntcore/src/test/native/cpp/net/WireEncoderTest.cpp +++ b/ntcore/src/test/native/cpp/net/WireEncoderTest.cpp @@ -7,6 +7,7 @@ #include #include +#include #include #include @@ -15,7 +16,6 @@ #include "Handle.h" #include "PubSubOptions.h" #include "gmock/gmock-matchers.h" -#include "gtest/gtest.h" #include "net/Message.h" #include "net/WireEncoder.h" #include "networktables/NetworkTableValue.h" diff --git a/ntcore/src/test/native/cpp/net3/WireDecoder3Test.cpp b/ntcore/src/test/native/cpp/net3/WireDecoder3Test.cpp index 1cd6ecb915..23a9f889b8 100644 --- a/ntcore/src/test/native/cpp/net3/WireDecoder3Test.cpp +++ b/ntcore/src/test/native/cpp/net3/WireDecoder3Test.cpp @@ -9,11 +9,12 @@ #include #include +#include + #include "../SpanMatcher.h" #include "../TestPrinters.h" #include "../ValueMatcher.h" #include "gmock/gmock.h" -#include "gtest/gtest.h" #include "net3/WireDecoder3.h" #include "networktables/NetworkTableValue.h" diff --git a/ntcore/src/test/native/cpp/net3/WireEncoder3Test.cpp b/ntcore/src/test/native/cpp/net3/WireEncoder3Test.cpp index bb4bfd2cac..d284ff4577 100644 --- a/ntcore/src/test/native/cpp/net3/WireEncoder3Test.cpp +++ b/ntcore/src/test/native/cpp/net3/WireEncoder3Test.cpp @@ -8,11 +8,11 @@ #include #include +#include #include #include "../SpanMatcher.h" #include "../TestPrinters.h" -#include "gtest/gtest.h" #include "net3/Message3.h" #include "net3/WireEncoder3.h" #include "networktables/NetworkTableValue.h" diff --git a/simulation/halsim_ds_socket/src/test/native/cpp/DSCommPacketTest.cpp b/simulation/halsim_ds_socket/src/test/native/cpp/DSCommPacketTest.cpp index d1a892a728..1c7bfc5dc9 100644 --- a/simulation/halsim_ds_socket/src/test/native/cpp/DSCommPacketTest.cpp +++ b/simulation/halsim_ds_socket/src/test/native/cpp/DSCommPacketTest.cpp @@ -2,8 +2,9 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include + #include "DSCommPacket.h" -#include "gtest/gtest.h" class DSCommPacketTest : public ::testing::Test { public: diff --git a/simulation/halsim_ds_socket/src/test/native/cpp/main.cpp b/simulation/halsim_ds_socket/src/test/native/cpp/main.cpp index 6aea19a01e..d181e39c9f 100644 --- a/simulation/halsim_ds_socket/src/test/native/cpp/main.cpp +++ b/simulation/halsim_ds_socket/src/test/native/cpp/main.cpp @@ -2,10 +2,9 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include -#include "gtest/gtest.h" - int main(int argc, char** argv) { HAL_Initialize(500, 0); ::testing::InitGoogleTest(&argc, argv); diff --git a/simulation/halsim_gui/src/test/native/cpp/main.cpp b/simulation/halsim_gui/src/test/native/cpp/main.cpp index 6aea19a01e..d181e39c9f 100644 --- a/simulation/halsim_gui/src/test/native/cpp/main.cpp +++ b/simulation/halsim_gui/src/test/native/cpp/main.cpp @@ -2,10 +2,9 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include -#include "gtest/gtest.h" - int main(int argc, char** argv) { HAL_Initialize(500, 0); ::testing::InitGoogleTest(&argc, argv); diff --git a/simulation/halsim_ws_server/src/test/native/cpp/main.cpp b/simulation/halsim_ws_server/src/test/native/cpp/main.cpp index a9f739a5a8..61e3a887af 100644 --- a/simulation/halsim_ws_server/src/test/native/cpp/main.cpp +++ b/simulation/halsim_ws_server/src/test/native/cpp/main.cpp @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -13,7 +14,6 @@ #include "HALSimWSServer.h" #include "WebServerClientTest.h" -#include "gtest/gtest.h" namespace uv = wpi::uv; diff --git a/wpilibNewCommands/.styleguide b/wpilibNewCommands/.styleguide index 3f20ec8a2a..7c8d7a70fb 100644 --- a/wpilibNewCommands/.styleguide +++ b/wpilibNewCommands/.styleguide @@ -17,6 +17,7 @@ includeOtherLibs { ^cscore ^fmt/ ^frc/ + ^gtest/ ^hal/ ^imgui ^mockdata/ diff --git a/wpilibNewCommands/src/test/native/cpp/frc2/command/CommandTestBase.h b/wpilibNewCommands/src/test/native/cpp/frc2/command/CommandTestBase.h index 594ca8e1d2..41a794ef44 100644 --- a/wpilibNewCommands/src/test/native/cpp/frc2/command/CommandTestBase.h +++ b/wpilibNewCommands/src/test/native/cpp/frc2/command/CommandTestBase.h @@ -9,13 +9,13 @@ #include #include +#include #include "frc2/command/CommandHelper.h" #include "frc2/command/CommandScheduler.h" #include "frc2/command/SetUtilities.h" #include "frc2/command/Subsystem.h" #include "gmock/gmock.h" -#include "gtest/gtest.h" #include "make_vector.h" namespace frc2 { diff --git a/wpilibNewCommands/src/test/native/cpp/frc2/command/CompositionTestBase.h b/wpilibNewCommands/src/test/native/cpp/frc2/command/CompositionTestBase.h index c12922ffb6..58fbcc393b 100644 --- a/wpilibNewCommands/src/test/native/cpp/frc2/command/CompositionTestBase.h +++ b/wpilibNewCommands/src/test/native/cpp/frc2/command/CompositionTestBase.h @@ -7,9 +7,10 @@ #include #include +#include + #include "CommandTestBase.h" #include "frc2/command/Commands.h" -#include "gtest/gtest.h" #include "make_vector.h" namespace frc2 { diff --git a/wpilibNewCommands/src/test/native/cpp/frc2/command/MecanumControllerCommandTest.cpp b/wpilibNewCommands/src/test/native/cpp/frc2/command/MecanumControllerCommandTest.cpp index 0868716ac6..80cd88d4d8 100644 --- a/wpilibNewCommands/src/test/native/cpp/frc2/command/MecanumControllerCommandTest.cpp +++ b/wpilibNewCommands/src/test/native/cpp/frc2/command/MecanumControllerCommandTest.cpp @@ -16,9 +16,9 @@ #include #include #include +#include #include "CommandTestBase.h" -#include "gtest/gtest.h" #define EXPECT_NEAR_UNITS(val1, val2, eps) \ EXPECT_LE(units::math::abs(val1 - val2), eps) diff --git a/wpilibNewCommands/src/test/native/cpp/frc2/command/POVButtonTest.cpp b/wpilibNewCommands/src/test/native/cpp/frc2/command/POVButtonTest.cpp index bcb7dece94..035fd4926c 100644 --- a/wpilibNewCommands/src/test/native/cpp/frc2/command/POVButtonTest.cpp +++ b/wpilibNewCommands/src/test/native/cpp/frc2/command/POVButtonTest.cpp @@ -4,13 +4,13 @@ #include #include +#include #include "CommandTestBase.h" #include "frc2/command/CommandScheduler.h" #include "frc2/command/RunCommand.h" #include "frc2/command/WaitUntilCommand.h" #include "frc2/command/button/POVButton.h" -#include "gtest/gtest.h" using namespace frc2; class POVButtonTest : public CommandTestBase {}; diff --git a/wpilibNewCommands/src/test/native/cpp/frc2/command/SchedulingRecursionTest.cpp b/wpilibNewCommands/src/test/native/cpp/frc2/command/SchedulingRecursionTest.cpp index 5c9bbbdfe0..f1bbfd6143 100644 --- a/wpilibNewCommands/src/test/native/cpp/frc2/command/SchedulingRecursionTest.cpp +++ b/wpilibNewCommands/src/test/native/cpp/frc2/command/SchedulingRecursionTest.cpp @@ -2,11 +2,12 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include + #include "CommandTestBase.h" #include "frc2/command/Command.h" #include "frc2/command/CommandHelper.h" #include "frc2/command/RunCommand.h" -#include "gtest/gtest.h" using namespace frc2; diff --git a/wpilibNewCommands/src/test/native/cpp/frc2/command/SwerveControllerCommandTest.cpp b/wpilibNewCommands/src/test/native/cpp/frc2/command/SwerveControllerCommandTest.cpp index 0a3557c9eb..d392685cc2 100644 --- a/wpilibNewCommands/src/test/native/cpp/frc2/command/SwerveControllerCommandTest.cpp +++ b/wpilibNewCommands/src/test/native/cpp/frc2/command/SwerveControllerCommandTest.cpp @@ -17,9 +17,9 @@ #include #include #include +#include #include "CommandTestBase.h" -#include "gtest/gtest.h" #define EXPECT_NEAR_UNITS(val1, val2, eps) \ EXPECT_LE(units::math::abs(val1 - val2), eps) diff --git a/wpilibNewCommands/src/test/native/cpp/frc2/command/button/NetworkButtonTest.cpp b/wpilibNewCommands/src/test/native/cpp/frc2/command/button/NetworkButtonTest.cpp index 51da1d2939..3f969ac1d3 100644 --- a/wpilibNewCommands/src/test/native/cpp/frc2/command/button/NetworkButtonTest.cpp +++ b/wpilibNewCommands/src/test/native/cpp/frc2/command/button/NetworkButtonTest.cpp @@ -2,6 +2,7 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include #include "../CommandTestBase.h" @@ -9,7 +10,6 @@ #include "frc2/command/RunCommand.h" #include "frc2/command/WaitUntilCommand.h" #include "frc2/command/button/NetworkButton.h" -#include "gtest/gtest.h" using namespace frc2; diff --git a/wpilibNewCommands/src/test/native/cpp/frc2/command/button/TriggerTest.cpp b/wpilibNewCommands/src/test/native/cpp/frc2/command/button/TriggerTest.cpp index a3c27e3e5e..4acaa66208 100644 --- a/wpilibNewCommands/src/test/native/cpp/frc2/command/button/TriggerTest.cpp +++ b/wpilibNewCommands/src/test/native/cpp/frc2/command/button/TriggerTest.cpp @@ -3,6 +3,7 @@ // the WPILib BSD license file in the root directory of this project. #include +#include #include "../CommandTestBase.h" #include "frc2/command/CommandPtr.h" @@ -11,7 +12,6 @@ #include "frc2/command/RunCommand.h" #include "frc2/command/WaitUntilCommand.h" #include "frc2/command/button/Trigger.h" -#include "gtest/gtest.h" using namespace frc2; class TriggerTest : public CommandTestBase {}; diff --git a/wpilibNewCommands/src/test/native/cpp/main.cpp b/wpilibNewCommands/src/test/native/cpp/main.cpp index 6aea19a01e..d181e39c9f 100644 --- a/wpilibNewCommands/src/test/native/cpp/main.cpp +++ b/wpilibNewCommands/src/test/native/cpp/main.cpp @@ -2,10 +2,9 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include -#include "gtest/gtest.h" - int main(int argc, char** argv) { HAL_Initialize(500, 0); ::testing::InitGoogleTest(&argc, argv); diff --git a/wpilibc/src/test/native/cpp/AnalogPotentiometerTest.cpp b/wpilibc/src/test/native/cpp/AnalogPotentiometerTest.cpp index de6989486b..c8d3068307 100644 --- a/wpilibc/src/test/native/cpp/AnalogPotentiometerTest.cpp +++ b/wpilibc/src/test/native/cpp/AnalogPotentiometerTest.cpp @@ -2,12 +2,12 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include #include "frc/AnalogPotentiometer.h" #include "frc/simulation/AnalogInputSim.h" #include "frc/simulation/RoboRioSim.h" -#include "gtest/gtest.h" namespace frc { using namespace frc::sim; diff --git a/wpilibc/src/test/native/cpp/DoubleSolenoidTestCTRE.cpp b/wpilibc/src/test/native/cpp/DoubleSolenoidTestCTRE.cpp index 2678395fa2..7534945882 100644 --- a/wpilibc/src/test/native/cpp/DoubleSolenoidTestCTRE.cpp +++ b/wpilibc/src/test/native/cpp/DoubleSolenoidTestCTRE.cpp @@ -2,12 +2,12 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include #include "frc/DoubleSolenoid.h" #include "frc/PneumaticsControlModule.h" #include "frc/Solenoid.h" -#include "gtest/gtest.h" namespace frc { diff --git a/wpilibc/src/test/native/cpp/DoubleSolenoidTestREV.cpp b/wpilibc/src/test/native/cpp/DoubleSolenoidTestREV.cpp index 23893c47b7..336d3170f9 100644 --- a/wpilibc/src/test/native/cpp/DoubleSolenoidTestREV.cpp +++ b/wpilibc/src/test/native/cpp/DoubleSolenoidTestREV.cpp @@ -2,12 +2,12 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include #include "frc/DoubleSolenoid.h" #include "frc/PneumaticsControlModule.h" #include "frc/Solenoid.h" -#include "gtest/gtest.h" namespace frc { diff --git a/wpilibc/src/test/native/cpp/DriverStationTest.cpp b/wpilibc/src/test/native/cpp/DriverStationTest.cpp index c191e2b7ad..b05023309a 100644 --- a/wpilibc/src/test/native/cpp/DriverStationTest.cpp +++ b/wpilibc/src/test/native/cpp/DriverStationTest.cpp @@ -5,11 +5,12 @@ #include #include +#include + #include "frc/DriverStation.h" #include "frc/Joystick.h" #include "frc/simulation/DriverStationSim.h" #include "frc/simulation/SimHooks.h" -#include "gtest/gtest.h" class IsJoystickConnectedParametersTest : public ::testing::TestWithParam> {}; diff --git a/wpilibc/src/test/native/cpp/InterruptTest.cpp b/wpilibc/src/test/native/cpp/InterruptTest.cpp index 1bf0aa2b7f..96af18089f 100644 --- a/wpilibc/src/test/native/cpp/InterruptTest.cpp +++ b/wpilibc/src/test/native/cpp/InterruptTest.cpp @@ -4,13 +4,13 @@ #include +#include #include #include "frc/AsynchronousInterrupt.h" #include "frc/DigitalInput.h" #include "frc/Timer.h" #include "frc/simulation/DIOSim.h" -#include "gtest/gtest.h" namespace frc { using namespace frc::sim; diff --git a/wpilibc/src/test/native/cpp/JoystickTest.cpp b/wpilibc/src/test/native/cpp/JoystickTest.cpp index 144e73edc8..6aa75ec49b 100644 --- a/wpilibc/src/test/native/cpp/JoystickTest.cpp +++ b/wpilibc/src/test/native/cpp/JoystickTest.cpp @@ -4,9 +4,10 @@ #include "frc/Joystick.h" // NOLINT(build/include_order) +#include + #include "JoystickTestMacros.h" #include "frc/simulation/JoystickSim.h" -#include "gtest/gtest.h" using namespace frc; diff --git a/wpilibc/src/test/native/cpp/NotifierTest.cpp b/wpilibc/src/test/native/cpp/NotifierTest.cpp index 05e2e87688..46e292bc7f 100644 --- a/wpilibc/src/test/native/cpp/NotifierTest.cpp +++ b/wpilibc/src/test/native/cpp/NotifierTest.cpp @@ -4,9 +4,10 @@ #include +#include + #include "frc/Notifier.h" #include "frc/simulation/SimHooks.h" -#include "gtest/gtest.h" using namespace frc; diff --git a/wpilibc/src/test/native/cpp/PS4ControllerTest.cpp b/wpilibc/src/test/native/cpp/PS4ControllerTest.cpp index 329a16515f..4284aed36c 100644 --- a/wpilibc/src/test/native/cpp/PS4ControllerTest.cpp +++ b/wpilibc/src/test/native/cpp/PS4ControllerTest.cpp @@ -4,9 +4,10 @@ #include "frc/PS4Controller.h" // NOLINT(build/include_order) +#include + #include "JoystickTestMacros.h" #include "frc/simulation/PS4ControllerSim.h" -#include "gtest/gtest.h" using namespace frc; diff --git a/wpilibc/src/test/native/cpp/ScopedTracerTest.cpp b/wpilibc/src/test/native/cpp/ScopedTracerTest.cpp index c4ef317404..f4107e72fe 100644 --- a/wpilibc/src/test/native/cpp/ScopedTracerTest.cpp +++ b/wpilibc/src/test/native/cpp/ScopedTracerTest.cpp @@ -4,13 +4,13 @@ #include +#include #include #include #include #include "frc/ScopedTracer.h" #include "frc/simulation/SimHooks.h" -#include "gtest/gtest.h" TEST(ScopedTracerTest, Timing) { wpi::SmallString<128> buf; diff --git a/wpilibc/src/test/native/cpp/SolenoidTestCTRE.cpp b/wpilibc/src/test/native/cpp/SolenoidTestCTRE.cpp index 61e3fb61cb..f30a97646a 100644 --- a/wpilibc/src/test/native/cpp/SolenoidTestCTRE.cpp +++ b/wpilibc/src/test/native/cpp/SolenoidTestCTRE.cpp @@ -2,12 +2,12 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include #include "frc/DoubleSolenoid.h" #include "frc/PneumaticsControlModule.h" #include "frc/Solenoid.h" -#include "gtest/gtest.h" namespace frc { TEST(SolenoidCTRETest, ValidInitialization) { diff --git a/wpilibc/src/test/native/cpp/SolenoidTestREV.cpp b/wpilibc/src/test/native/cpp/SolenoidTestREV.cpp index 75ea261e68..3f3dc404b7 100644 --- a/wpilibc/src/test/native/cpp/SolenoidTestREV.cpp +++ b/wpilibc/src/test/native/cpp/SolenoidTestREV.cpp @@ -2,12 +2,12 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include #include "frc/DoubleSolenoid.h" #include "frc/PneumaticsControlModule.h" #include "frc/Solenoid.h" -#include "gtest/gtest.h" namespace frc { TEST(SolenoidREVTest, ValidInitialization) { diff --git a/wpilibc/src/test/native/cpp/TimedRobotTest.cpp b/wpilibc/src/test/native/cpp/TimedRobotTest.cpp index f899cbf9ec..78d18b5b3c 100644 --- a/wpilibc/src/test/native/cpp/TimedRobotTest.cpp +++ b/wpilibc/src/test/native/cpp/TimedRobotTest.cpp @@ -9,10 +9,11 @@ #include #include +#include + #include "frc/livewindow/LiveWindow.h" #include "frc/simulation/DriverStationSim.h" #include "frc/simulation/SimHooks.h" -#include "gtest/gtest.h" using namespace frc; diff --git a/wpilibc/src/test/native/cpp/TimerTest.cpp b/wpilibc/src/test/native/cpp/TimerTest.cpp index a7adc45b42..fd66541e90 100644 --- a/wpilibc/src/test/native/cpp/TimerTest.cpp +++ b/wpilibc/src/test/native/cpp/TimerTest.cpp @@ -4,8 +4,9 @@ #include "frc/Timer.h" // NOLINT(build/include_order) +#include + #include "frc/simulation/SimHooks.h" -#include "gtest/gtest.h" using namespace frc; diff --git a/wpilibc/src/test/native/cpp/TimesliceRobotTest.cpp b/wpilibc/src/test/native/cpp/TimesliceRobotTest.cpp index a2e4e13eda..5ff9e1a6cc 100644 --- a/wpilibc/src/test/native/cpp/TimesliceRobotTest.cpp +++ b/wpilibc/src/test/native/cpp/TimesliceRobotTest.cpp @@ -9,9 +9,10 @@ #include #include +#include + #include "frc/simulation/DriverStationSim.h" #include "frc/simulation/SimHooks.h" -#include "gtest/gtest.h" using namespace frc; diff --git a/wpilibc/src/test/native/cpp/UltrasonicTest.cpp b/wpilibc/src/test/native/cpp/UltrasonicTest.cpp index 0cc49ba9c9..ca901dba02 100644 --- a/wpilibc/src/test/native/cpp/UltrasonicTest.cpp +++ b/wpilibc/src/test/native/cpp/UltrasonicTest.cpp @@ -2,9 +2,10 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include + #include "frc/Ultrasonic.h" #include "frc/simulation/UltrasonicSim.h" -#include "gtest/gtest.h" using namespace frc; diff --git a/wpilibc/src/test/native/cpp/UnitNetworkTablesTest.cpp b/wpilibc/src/test/native/cpp/UnitNetworkTablesTest.cpp index 505f906ec9..9b6d10eb20 100644 --- a/wpilibc/src/test/native/cpp/UnitNetworkTablesTest.cpp +++ b/wpilibc/src/test/native/cpp/UnitNetworkTablesTest.cpp @@ -2,13 +2,12 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include #include #include #include -#include "gtest/gtest.h" - class UnitNetworkTablesTest : public ::testing::Test { public: UnitNetworkTablesTest() : inst{nt::NetworkTableInstance::Create()} {} diff --git a/wpilibc/src/test/native/cpp/WatchdogTest.cpp b/wpilibc/src/test/native/cpp/WatchdogTest.cpp index 5f55c2fa61..55031d3dee 100644 --- a/wpilibc/src/test/native/cpp/WatchdogTest.cpp +++ b/wpilibc/src/test/native/cpp/WatchdogTest.cpp @@ -6,8 +6,9 @@ #include +#include + #include "frc/simulation/SimHooks.h" -#include "gtest/gtest.h" using namespace frc; diff --git a/wpilibc/src/test/native/cpp/XboxControllerTest.cpp b/wpilibc/src/test/native/cpp/XboxControllerTest.cpp index 0a8316b466..3798fde51c 100644 --- a/wpilibc/src/test/native/cpp/XboxControllerTest.cpp +++ b/wpilibc/src/test/native/cpp/XboxControllerTest.cpp @@ -4,9 +4,10 @@ #include "frc/XboxController.h" // NOLINT(build/include_order) +#include + #include "JoystickTestMacros.h" #include "frc/simulation/XboxControllerSim.h" -#include "gtest/gtest.h" using namespace frc; diff --git a/wpilibc/src/test/native/cpp/drive/DifferentialDriveTest.cpp b/wpilibc/src/test/native/cpp/drive/DifferentialDriveTest.cpp index 1f542be14f..f21f268f25 100644 --- a/wpilibc/src/test/native/cpp/drive/DifferentialDriveTest.cpp +++ b/wpilibc/src/test/native/cpp/drive/DifferentialDriveTest.cpp @@ -2,8 +2,9 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include + #include "frc/drive/DifferentialDrive.h" -#include "gtest/gtest.h" #include "motorcontrol/MockMotorController.h" TEST(DifferentialDriveTest, ArcadeDriveIK) { diff --git a/wpilibc/src/test/native/cpp/drive/MecanumDriveTest.cpp b/wpilibc/src/test/native/cpp/drive/MecanumDriveTest.cpp index de554625df..1bbf464106 100644 --- a/wpilibc/src/test/native/cpp/drive/MecanumDriveTest.cpp +++ b/wpilibc/src/test/native/cpp/drive/MecanumDriveTest.cpp @@ -2,8 +2,9 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include + #include "frc/drive/MecanumDrive.h" -#include "gtest/gtest.h" #include "motorcontrol/MockMotorController.h" TEST(MecanumDriveTest, CartesianIK) { diff --git a/wpilibc/src/test/native/cpp/event/NetworkBooleanEventTest.cpp b/wpilibc/src/test/native/cpp/event/NetworkBooleanEventTest.cpp index d2ac7c43b2..0d4ce49759 100644 --- a/wpilibc/src/test/native/cpp/event/NetworkBooleanEventTest.cpp +++ b/wpilibc/src/test/native/cpp/event/NetworkBooleanEventTest.cpp @@ -2,12 +2,12 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include #include #include "frc/event/EventLoop.h" #include "frc/event/NetworkBooleanEvent.h" -#include "gtest/gtest.h" using namespace frc; diff --git a/wpilibc/src/test/native/cpp/main.cpp b/wpilibc/src/test/native/cpp/main.cpp index ba2997526c..e0bad04df3 100644 --- a/wpilibc/src/test/native/cpp/main.cpp +++ b/wpilibc/src/test/native/cpp/main.cpp @@ -2,10 +2,9 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include -#include "gtest/gtest.h" - #ifndef __FRC_ROBORIO__ namespace frc::impl { void ResetMotorSafety(); diff --git a/wpilibc/src/test/native/cpp/motorcontrol/MotorControllerGroupTest.cpp b/wpilibc/src/test/native/cpp/motorcontrol/MotorControllerGroupTest.cpp index 48cf700b04..4ff889ad81 100644 --- a/wpilibc/src/test/native/cpp/motorcontrol/MotorControllerGroupTest.cpp +++ b/wpilibc/src/test/native/cpp/motorcontrol/MotorControllerGroupTest.cpp @@ -7,7 +7,8 @@ #include #include -#include "gtest/gtest.h" +#include + #include "motorcontrol/MockMotorController.h" using namespace frc; diff --git a/wpilibc/src/test/native/cpp/shuffleboard/ShuffleboardInstanceTest.cpp b/wpilibc/src/test/native/cpp/shuffleboard/ShuffleboardInstanceTest.cpp index 7fbba6ba4b..cb2e0023e8 100644 --- a/wpilibc/src/test/native/cpp/shuffleboard/ShuffleboardInstanceTest.cpp +++ b/wpilibc/src/test/native/cpp/shuffleboard/ShuffleboardInstanceTest.cpp @@ -6,12 +6,12 @@ #include +#include #include #include #include #include "frc/shuffleboard/ShuffleboardInstance.h" -#include "gtest/gtest.h" #include "shuffleboard/MockActuatorSendable.h" class NTWrapper { diff --git a/wpilibc/src/test/native/cpp/shuffleboard/ShuffleboardTest.cpp b/wpilibc/src/test/native/cpp/shuffleboard/ShuffleboardTest.cpp index 693aac450e..db689db4ce 100644 --- a/wpilibc/src/test/native/cpp/shuffleboard/ShuffleboardTest.cpp +++ b/wpilibc/src/test/native/cpp/shuffleboard/ShuffleboardTest.cpp @@ -2,8 +2,9 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include + #include "frc/shuffleboard/Shuffleboard.h" -#include "gtest/gtest.h" TEST(ShuffleboardTest, TabObjectsCached) { auto& tab1 = frc::Shuffleboard::GetTab("testTabObjectsCached"); diff --git a/wpilibc/src/test/native/cpp/shuffleboard/SuppliedValueWidgetTest.cpp b/wpilibc/src/test/native/cpp/shuffleboard/SuppliedValueWidgetTest.cpp index d964639b6e..37185dd27a 100644 --- a/wpilibc/src/test/native/cpp/shuffleboard/SuppliedValueWidgetTest.cpp +++ b/wpilibc/src/test/native/cpp/shuffleboard/SuppliedValueWidgetTest.cpp @@ -2,12 +2,12 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include #include #include "frc/shuffleboard/ShuffleboardInstance.h" #include "frc/shuffleboard/ShuffleboardTab.h" -#include "gtest/gtest.h" using namespace frc; diff --git a/wpilibc/src/test/native/cpp/simulation/ADXL345SimTest.cpp b/wpilibc/src/test/native/cpp/simulation/ADXL345SimTest.cpp index 832db94337..2495ad04b1 100644 --- a/wpilibc/src/test/native/cpp/simulation/ADXL345SimTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/ADXL345SimTest.cpp @@ -4,11 +4,11 @@ #include "frc/simulation/ADXL345Sim.h" // NOLINT(build/include_order) +#include #include #include "frc/ADXL345_I2C.h" #include "frc/ADXL345_SPI.h" -#include "gtest/gtest.h" namespace frc::sim { diff --git a/wpilibc/src/test/native/cpp/simulation/ADXL362SimTest.cpp b/wpilibc/src/test/native/cpp/simulation/ADXL362SimTest.cpp index aab0a12919..3658ffd138 100644 --- a/wpilibc/src/test/native/cpp/simulation/ADXL362SimTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/ADXL362SimTest.cpp @@ -4,10 +4,10 @@ #include "frc/simulation/ADXL362Sim.h" // NOLINT(build/include_order) +#include #include #include "frc/ADXL362.h" -#include "gtest/gtest.h" namespace frc::sim { diff --git a/wpilibc/src/test/native/cpp/simulation/ADXRS450_GyroSimTest.cpp b/wpilibc/src/test/native/cpp/simulation/ADXRS450_GyroSimTest.cpp index 57c4fbe248..ea99f80a77 100644 --- a/wpilibc/src/test/native/cpp/simulation/ADXRS450_GyroSimTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/ADXRS450_GyroSimTest.cpp @@ -4,10 +4,10 @@ #include "frc/simulation/ADXRS450_GyroSim.h" // NOLINT(build/include_order) +#include #include #include "frc/ADXRS450_Gyro.h" -#include "gtest/gtest.h" namespace frc::sim { diff --git a/wpilibc/src/test/native/cpp/simulation/AccelerometerSimTest.cpp b/wpilibc/src/test/native/cpp/simulation/AccelerometerSimTest.cpp index 34ebe02172..328645d25d 100644 --- a/wpilibc/src/test/native/cpp/simulation/AccelerometerSimTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/AccelerometerSimTest.cpp @@ -4,12 +4,12 @@ #include "frc/simulation/BuiltInAccelerometerSim.h" // NOLINT(build/include_order) +#include #include #include #include "callback_helpers/TestCallbackHelpers.h" #include "frc/BuiltInAccelerometer.h" -#include "gtest/gtest.h" namespace frc::sim { diff --git a/wpilibc/src/test/native/cpp/simulation/AddressableLEDSimTest.cpp b/wpilibc/src/test/native/cpp/simulation/AddressableLEDSimTest.cpp index e450477963..6907cf6f52 100644 --- a/wpilibc/src/test/native/cpp/simulation/AddressableLEDSimTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/AddressableLEDSimTest.cpp @@ -6,11 +6,11 @@ #include +#include #include #include "callback_helpers/TestCallbackHelpers.h" #include "frc/AddressableLED.h" -#include "gtest/gtest.h" namespace frc::sim { diff --git a/wpilibc/src/test/native/cpp/simulation/AnalogEncoderSimTest.cpp b/wpilibc/src/test/native/cpp/simulation/AnalogEncoderSimTest.cpp index 0a1b687175..3f0ea45920 100644 --- a/wpilibc/src/test/native/cpp/simulation/AnalogEncoderSimTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/AnalogEncoderSimTest.cpp @@ -4,13 +4,13 @@ #include +#include #include #include #include "frc/AnalogEncoder.h" #include "frc/AnalogInput.h" #include "frc/simulation/AnalogEncoderSim.h" -#include "gtest/gtest.h" #define EXPECT_NEAR_UNITS(val1, val2, eps) \ EXPECT_LE(units::math::abs(val1 - val2), eps) diff --git a/wpilibc/src/test/native/cpp/simulation/AnalogGyroSimTest.cpp b/wpilibc/src/test/native/cpp/simulation/AnalogGyroSimTest.cpp index f1baaca769..e82fa0480f 100644 --- a/wpilibc/src/test/native/cpp/simulation/AnalogGyroSimTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/AnalogGyroSimTest.cpp @@ -4,12 +4,12 @@ #include "frc/simulation/AnalogGyroSim.h" // NOLINT(build/include_order) +#include #include #include "callback_helpers/TestCallbackHelpers.h" #include "frc/AnalogGyro.h" #include "frc/AnalogInput.h" -#include "gtest/gtest.h" namespace frc::sim { diff --git a/wpilibc/src/test/native/cpp/simulation/AnalogInputSimTest.cpp b/wpilibc/src/test/native/cpp/simulation/AnalogInputSimTest.cpp index 8b4569ebf0..2f963fa34e 100644 --- a/wpilibc/src/test/native/cpp/simulation/AnalogInputSimTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/AnalogInputSimTest.cpp @@ -4,11 +4,11 @@ #include "frc/simulation/AnalogInputSim.h" // NOLINT(build/include_order) +#include #include #include "callback_helpers/TestCallbackHelpers.h" #include "frc/AnalogInput.h" -#include "gtest/gtest.h" namespace frc::sim { diff --git a/wpilibc/src/test/native/cpp/simulation/AnalogOutputSimTest.cpp b/wpilibc/src/test/native/cpp/simulation/AnalogOutputSimTest.cpp index 630f2c99cd..bbe2b8117e 100644 --- a/wpilibc/src/test/native/cpp/simulation/AnalogOutputSimTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/AnalogOutputSimTest.cpp @@ -4,11 +4,11 @@ #include "frc/simulation/AnalogOutputSim.h" // NOLINT(build/include_order) +#include #include #include "callback_helpers/TestCallbackHelpers.h" #include "frc/AnalogOutput.h" -#include "gtest/gtest.h" namespace frc::sim { diff --git a/wpilibc/src/test/native/cpp/simulation/AnalogTriggerSimTest.cpp b/wpilibc/src/test/native/cpp/simulation/AnalogTriggerSimTest.cpp index 5e9e28e610..c01f64f64a 100644 --- a/wpilibc/src/test/native/cpp/simulation/AnalogTriggerSimTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/AnalogTriggerSimTest.cpp @@ -4,11 +4,11 @@ #include "frc/simulation/AnalogTriggerSim.h" // NOLINT(build/include_order) +#include #include #include "callback_helpers/TestCallbackHelpers.h" #include "frc/AnalogTrigger.h" -#include "gtest/gtest.h" namespace frc::sim { diff --git a/wpilibc/src/test/native/cpp/simulation/CTREPCMSimTest.cpp b/wpilibc/src/test/native/cpp/simulation/CTREPCMSimTest.cpp index 8082ed5c3c..0d3e6ecc06 100644 --- a/wpilibc/src/test/native/cpp/simulation/CTREPCMSimTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/CTREPCMSimTest.cpp @@ -4,12 +4,12 @@ #include "frc/simulation/CTREPCMSim.h" // NOLINT(build/include_order) +#include #include #include "callback_helpers/TestCallbackHelpers.h" #include "frc/DoubleSolenoid.h" #include "frc/PneumaticsControlModule.h" -#include "gtest/gtest.h" namespace frc::sim { diff --git a/wpilibc/src/test/native/cpp/simulation/DCMotorSimTest.cpp b/wpilibc/src/test/native/cpp/simulation/DCMotorSimTest.cpp index efed939bb3..abd316df05 100644 --- a/wpilibc/src/test/native/cpp/simulation/DCMotorSimTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/DCMotorSimTest.cpp @@ -2,6 +2,8 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include + #include "frc/Encoder.h" #include "frc/RobotController.h" #include "frc/controller/PIDController.h" @@ -10,7 +12,6 @@ #include "frc/simulation/DCMotorSim.h" #include "frc/simulation/EncoderSim.h" #include "frc/simulation/RoboRioSim.h" -#include "gtest/gtest.h" TEST(DCMotorSimTest, VoltageSteadyState) { frc::DCMotor gearbox = frc::DCMotor::NEO(1); diff --git a/wpilibc/src/test/native/cpp/simulation/DIOSimTest.cpp b/wpilibc/src/test/native/cpp/simulation/DIOSimTest.cpp index 338d24ebf5..3e67955739 100644 --- a/wpilibc/src/test/native/cpp/simulation/DIOSimTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/DIOSimTest.cpp @@ -4,12 +4,12 @@ #include "frc/simulation/DIOSim.h" // NOLINT(build/include_order) +#include #include #include "callback_helpers/TestCallbackHelpers.h" #include "frc/DigitalInput.h" #include "frc/DigitalOutput.h" -#include "gtest/gtest.h" namespace frc::sim { diff --git a/wpilibc/src/test/native/cpp/simulation/DifferentialDrivetrainSimTest.cpp b/wpilibc/src/test/native/cpp/simulation/DifferentialDrivetrainSimTest.cpp index 6edfde08f2..7e564260ff 100644 --- a/wpilibc/src/test/native/cpp/simulation/DifferentialDrivetrainSimTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/DifferentialDrivetrainSimTest.cpp @@ -2,6 +2,7 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include #include #include @@ -15,7 +16,6 @@ #include "frc/system/plant/LinearSystemId.h" #include "frc/trajectory/TrajectoryGenerator.h" #include "frc/trajectory/constraint/DifferentialDriveKinematicsConstraint.h" -#include "gtest/gtest.h" TEST(DifferentialDrivetrainSimTest, Convergence) { auto motor = frc::DCMotor::NEO(2); diff --git a/wpilibc/src/test/native/cpp/simulation/DigitalPWMSimTest.cpp b/wpilibc/src/test/native/cpp/simulation/DigitalPWMSimTest.cpp index fd62edcc2c..27fb5cbd96 100644 --- a/wpilibc/src/test/native/cpp/simulation/DigitalPWMSimTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/DigitalPWMSimTest.cpp @@ -4,11 +4,11 @@ #include "frc/simulation/DigitalPWMSim.h" // NOLINT(build/include_order) +#include #include #include "callback_helpers/TestCallbackHelpers.h" #include "frc/DigitalOutput.h" -#include "gtest/gtest.h" namespace frc::sim { diff --git a/wpilibc/src/test/native/cpp/simulation/DriverStationSimTest.cpp b/wpilibc/src/test/native/cpp/simulation/DriverStationSimTest.cpp index 22b77db441..2513252893 100644 --- a/wpilibc/src/test/native/cpp/simulation/DriverStationSimTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/DriverStationSimTest.cpp @@ -5,13 +5,14 @@ #include #include +#include + #include "callback_helpers/TestCallbackHelpers.h" #include "frc/DriverStation.h" #include "frc/Joystick.h" #include "frc/RobotState.h" #include "frc/simulation/DriverStationSim.h" #include "frc/simulation/SimHooks.h" -#include "gtest/gtest.h" using namespace frc; using namespace frc::sim; diff --git a/wpilibc/src/test/native/cpp/simulation/DutyCycleEncoderSimTest.cpp b/wpilibc/src/test/native/cpp/simulation/DutyCycleEncoderSimTest.cpp index f5218c67a2..e81c63e3e2 100644 --- a/wpilibc/src/test/native/cpp/simulation/DutyCycleEncoderSimTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/DutyCycleEncoderSimTest.cpp @@ -4,11 +4,11 @@ #include "frc/simulation/DutyCycleEncoderSim.h" // NOLINT(build/include_order) +#include #include #include "callback_helpers/TestCallbackHelpers.h" #include "frc/DutyCycleEncoder.h" -#include "gtest/gtest.h" namespace frc::sim { diff --git a/wpilibc/src/test/native/cpp/simulation/DutyCycleSimTest.cpp b/wpilibc/src/test/native/cpp/simulation/DutyCycleSimTest.cpp index 56e0592fd6..297acc97c9 100644 --- a/wpilibc/src/test/native/cpp/simulation/DutyCycleSimTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/DutyCycleSimTest.cpp @@ -4,12 +4,12 @@ #include "frc/simulation/DutyCycleSim.h" // NOLINT(build/include_order) +#include #include #include "callback_helpers/TestCallbackHelpers.h" #include "frc/DigitalInput.h" #include "frc/DutyCycle.h" -#include "gtest/gtest.h" namespace frc::sim { diff --git a/wpilibc/src/test/native/cpp/simulation/ElevatorSimTest.cpp b/wpilibc/src/test/native/cpp/simulation/ElevatorSimTest.cpp index 4e7e652458..b155423077 100644 --- a/wpilibc/src/test/native/cpp/simulation/ElevatorSimTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/ElevatorSimTest.cpp @@ -2,6 +2,7 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include #include @@ -14,7 +15,6 @@ #include "frc/system/NumericalIntegration.h" #include "frc/system/plant/DCMotor.h" #include "frc/system/plant/LinearSystemId.h" -#include "gtest/gtest.h" #define EXPECT_NEAR_UNITS(val1, val2, eps) \ EXPECT_LE(units::math::abs(val1 - val2), eps) diff --git a/wpilibc/src/test/native/cpp/simulation/EncoderSimTest.cpp b/wpilibc/src/test/native/cpp/simulation/EncoderSimTest.cpp index d20acb3b0a..2a763af292 100644 --- a/wpilibc/src/test/native/cpp/simulation/EncoderSimTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/EncoderSimTest.cpp @@ -4,12 +4,12 @@ #include "frc/simulation/EncoderSim.h" // NOLINT(build/include_order) +#include #include #include #include "callback_helpers/TestCallbackHelpers.h" #include "frc/Encoder.h" -#include "gtest/gtest.h" namespace frc::sim { diff --git a/wpilibc/src/test/native/cpp/simulation/PDPSimTest.cpp b/wpilibc/src/test/native/cpp/simulation/PDPSimTest.cpp index 78711b1caf..ad058de734 100644 --- a/wpilibc/src/test/native/cpp/simulation/PDPSimTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/PDPSimTest.cpp @@ -4,11 +4,11 @@ #include "frc/simulation/PowerDistributionSim.h" // NOLINT(build/include_order) +#include #include #include "callback_helpers/TestCallbackHelpers.h" #include "frc/PowerDistribution.h" -#include "gtest/gtest.h" namespace frc::sim { diff --git a/wpilibc/src/test/native/cpp/simulation/PWMSimTest.cpp b/wpilibc/src/test/native/cpp/simulation/PWMSimTest.cpp index 71c3f2fd49..4dcdbb1fa2 100644 --- a/wpilibc/src/test/native/cpp/simulation/PWMSimTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/PWMSimTest.cpp @@ -4,11 +4,11 @@ #include "frc/simulation/PWMSim.h" // NOLINT(build/include_order) +#include #include #include "callback_helpers/TestCallbackHelpers.h" #include "frc/PWM.h" -#include "gtest/gtest.h" namespace frc::sim { diff --git a/wpilibc/src/test/native/cpp/simulation/REVPHSimTest.cpp b/wpilibc/src/test/native/cpp/simulation/REVPHSimTest.cpp index 688f37ec58..952107ba22 100644 --- a/wpilibc/src/test/native/cpp/simulation/REVPHSimTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/REVPHSimTest.cpp @@ -4,12 +4,12 @@ #include "frc/simulation/REVPHSim.h" // NOLINT(build/include_order) +#include #include #include "callback_helpers/TestCallbackHelpers.h" #include "frc/DoubleSolenoid.h" #include "frc/PneumaticHub.h" -#include "gtest/gtest.h" namespace frc::sim { diff --git a/wpilibc/src/test/native/cpp/simulation/RelaySimTest.cpp b/wpilibc/src/test/native/cpp/simulation/RelaySimTest.cpp index 292d6290bb..200ce111e3 100644 --- a/wpilibc/src/test/native/cpp/simulation/RelaySimTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/RelaySimTest.cpp @@ -4,11 +4,11 @@ #include "frc/simulation/RelaySim.h" // NOLINT(build/include_order) +#include #include #include "callback_helpers/TestCallbackHelpers.h" #include "frc/Relay.h" -#include "gtest/gtest.h" namespace frc::sim { diff --git a/wpilibc/src/test/native/cpp/simulation/RoboRioSimTest.cpp b/wpilibc/src/test/native/cpp/simulation/RoboRioSimTest.cpp index 98d4620fdf..56181fdd01 100644 --- a/wpilibc/src/test/native/cpp/simulation/RoboRioSimTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/RoboRioSimTest.cpp @@ -4,12 +4,12 @@ #include "frc/simulation/RoboRioSim.h" // NOLINT(build/include_order) +#include #include #include #include "callback_helpers/TestCallbackHelpers.h" #include "frc/RobotController.h" -#include "gtest/gtest.h" namespace frc::sim { diff --git a/wpilibc/src/test/native/cpp/simulation/SimDeviceSimTest.cpp b/wpilibc/src/test/native/cpp/simulation/SimDeviceSimTest.cpp index 7e015e48c1..3cd2a63717 100644 --- a/wpilibc/src/test/native/cpp/simulation/SimDeviceSimTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/SimDeviceSimTest.cpp @@ -4,10 +4,10 @@ #include +#include #include #include "frc/simulation/SimDeviceSim.h" -#include "gtest/gtest.h" using namespace frc::sim; diff --git a/wpilibc/src/test/native/cpp/simulation/SimInitializationTest.cpp b/wpilibc/src/test/native/cpp/simulation/SimInitializationTest.cpp index e703912aea..51c5386644 100644 --- a/wpilibc/src/test/native/cpp/simulation/SimInitializationTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/SimInitializationTest.cpp @@ -4,6 +4,7 @@ #include +#include #include #include "frc/simulation/AddressableLEDSim.h" @@ -23,7 +24,6 @@ #include "frc/simulation/RelaySim.h" #include "frc/simulation/RoboRioSim.h" #include "frc/simulation/SPIAccelerometerSim.h" -#include "gtest/gtest.h" using namespace frc::sim; diff --git a/wpilibc/src/test/native/cpp/simulation/SingleJointedArmSimTest.cpp b/wpilibc/src/test/native/cpp/simulation/SingleJointedArmSimTest.cpp index 07a1e1c409..1311a0ebf6 100644 --- a/wpilibc/src/test/native/cpp/simulation/SingleJointedArmSimTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/SingleJointedArmSimTest.cpp @@ -4,8 +4,9 @@ #include +#include + #include "frc/simulation/SingleJointedArmSim.h" -#include "gtest/gtest.h" TEST(SingleJointedArmTest, Disabled) { frc::sim::SingleJointedArmSim sim(frc::DCMotor::Vex775Pro(2), 300, 3_kg_sq_m, diff --git a/wpilibc/src/test/native/cpp/simulation/StateSpaceSimTest.cpp b/wpilibc/src/test/native/cpp/simulation/StateSpaceSimTest.cpp index f93fa7aa9b..168769c35d 100644 --- a/wpilibc/src/test/native/cpp/simulation/StateSpaceSimTest.cpp +++ b/wpilibc/src/test/native/cpp/simulation/StateSpaceSimTest.cpp @@ -2,6 +2,7 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include #include @@ -19,7 +20,6 @@ #include "frc/simulation/PWMSim.h" #include "frc/simulation/RoboRioSim.h" #include "frc/system/plant/LinearSystemId.h" -#include "gtest/gtest.h" TEST(StateSpaceSimTest, FlywheelSim) { const frc::LinearSystem<1, 1, 1> plant = diff --git a/wpilibc/src/test/native/cpp/smartdashboard/SendableChooserTest.cpp b/wpilibc/src/test/native/cpp/smartdashboard/SendableChooserTest.cpp index 0d36018a38..5728a072ab 100644 --- a/wpilibc/src/test/native/cpp/smartdashboard/SendableChooserTest.cpp +++ b/wpilibc/src/test/native/cpp/smartdashboard/SendableChooserTest.cpp @@ -7,10 +7,9 @@ #include +#include #include -#include "gtest/gtest.h" - class SendableChooserTest : public ::testing::TestWithParam {}; TEST_P(SendableChooserTest, ReturnsSelected) { diff --git a/wpilibcExamples/.styleguide b/wpilibcExamples/.styleguide index 677fedf91d..50ebdc9830 100644 --- a/wpilibcExamples/.styleguide +++ b/wpilibcExamples/.styleguide @@ -14,6 +14,7 @@ includeOtherLibs { ^fmt/ ^frc/ ^frc2/ + ^gtest/ ^hal/ ^networktables/ ^ntcore diff --git a/wpilibcExamples/src/test/cpp/examples/AddressableLED/cpp/RainbowTest.cpp b/wpilibcExamples/src/test/cpp/examples/AddressableLED/cpp/RainbowTest.cpp index fa891b4f13..ca06df9cdd 100644 --- a/wpilibcExamples/src/test/cpp/examples/AddressableLED/cpp/RainbowTest.cpp +++ b/wpilibcExamples/src/test/cpp/examples/AddressableLED/cpp/RainbowTest.cpp @@ -2,8 +2,6 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include - #include #include @@ -11,6 +9,7 @@ #include #include #include +#include #include #include "Robot.h" diff --git a/wpilibcExamples/src/test/cpp/examples/AddressableLED/cpp/main.cpp b/wpilibcExamples/src/test/cpp/examples/AddressableLED/cpp/main.cpp index 285c1d5267..38d5cfa2fe 100644 --- a/wpilibcExamples/src/test/cpp/examples/AddressableLED/cpp/main.cpp +++ b/wpilibcExamples/src/test/cpp/examples/AddressableLED/cpp/main.cpp @@ -2,10 +2,9 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include -#include "gtest/gtest.h" - /** * Runs all unit tests. */ diff --git a/wpilibcExamples/src/test/cpp/examples/ArmSimulation/cpp/ArmSimulationTest.cpp b/wpilibcExamples/src/test/cpp/examples/ArmSimulation/cpp/ArmSimulationTest.cpp index 56b1d19a84..af2c857b41 100644 --- a/wpilibcExamples/src/test/cpp/examples/ArmSimulation/cpp/ArmSimulationTest.cpp +++ b/wpilibcExamples/src/test/cpp/examples/ArmSimulation/cpp/ArmSimulationTest.cpp @@ -2,8 +2,6 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include - #include #include @@ -12,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/wpilibcExamples/src/test/cpp/examples/ArmSimulation/cpp/main.cpp b/wpilibcExamples/src/test/cpp/examples/ArmSimulation/cpp/main.cpp index 285c1d5267..38d5cfa2fe 100644 --- a/wpilibcExamples/src/test/cpp/examples/ArmSimulation/cpp/main.cpp +++ b/wpilibcExamples/src/test/cpp/examples/ArmSimulation/cpp/main.cpp @@ -2,10 +2,9 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include -#include "gtest/gtest.h" - /** * Runs all unit tests. */ diff --git a/wpilibcExamples/src/test/cpp/examples/DigitalCommunication/cpp/DigitalCommunicationTest.cpp b/wpilibcExamples/src/test/cpp/examples/DigitalCommunication/cpp/DigitalCommunicationTest.cpp index fc48b6db24..02bca00a40 100644 --- a/wpilibcExamples/src/test/cpp/examples/DigitalCommunication/cpp/DigitalCommunicationTest.cpp +++ b/wpilibcExamples/src/test/cpp/examples/DigitalCommunication/cpp/DigitalCommunicationTest.cpp @@ -2,14 +2,13 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include - #include #include #include #include #include +#include #include #include "Robot.h" diff --git a/wpilibcExamples/src/test/cpp/examples/DigitalCommunication/cpp/main.cpp b/wpilibcExamples/src/test/cpp/examples/DigitalCommunication/cpp/main.cpp index 285c1d5267..38d5cfa2fe 100644 --- a/wpilibcExamples/src/test/cpp/examples/DigitalCommunication/cpp/main.cpp +++ b/wpilibcExamples/src/test/cpp/examples/DigitalCommunication/cpp/main.cpp @@ -2,10 +2,9 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include -#include "gtest/gtest.h" - /** * Runs all unit tests. */ diff --git a/wpilibcExamples/src/test/cpp/examples/ElevatorSimulation/cpp/ElevatorSimulationTest.cpp b/wpilibcExamples/src/test/cpp/examples/ElevatorSimulation/cpp/ElevatorSimulationTest.cpp index f0b68c558c..99876dd48b 100644 --- a/wpilibcExamples/src/test/cpp/examples/ElevatorSimulation/cpp/ElevatorSimulationTest.cpp +++ b/wpilibcExamples/src/test/cpp/examples/ElevatorSimulation/cpp/ElevatorSimulationTest.cpp @@ -2,8 +2,6 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include - #include #include @@ -11,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/wpilibcExamples/src/test/cpp/examples/ElevatorSimulation/cpp/main.cpp b/wpilibcExamples/src/test/cpp/examples/ElevatorSimulation/cpp/main.cpp index 285c1d5267..38d5cfa2fe 100644 --- a/wpilibcExamples/src/test/cpp/examples/ElevatorSimulation/cpp/main.cpp +++ b/wpilibcExamples/src/test/cpp/examples/ElevatorSimulation/cpp/main.cpp @@ -2,10 +2,9 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include -#include "gtest/gtest.h" - /** * Runs all unit tests. */ diff --git a/wpilibcExamples/src/test/cpp/examples/I2CCommunication/cpp/I2CCommunicationTest.cpp b/wpilibcExamples/src/test/cpp/examples/I2CCommunication/cpp/I2CCommunicationTest.cpp index 5dc518d5af..44386be11d 100644 --- a/wpilibcExamples/src/test/cpp/examples/I2CCommunication/cpp/I2CCommunicationTest.cpp +++ b/wpilibcExamples/src/test/cpp/examples/I2CCommunication/cpp/I2CCommunicationTest.cpp @@ -2,13 +2,12 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include - #include #include #include #include +#include #include #include diff --git a/wpilibcExamples/src/test/cpp/examples/I2CCommunication/cpp/main.cpp b/wpilibcExamples/src/test/cpp/examples/I2CCommunication/cpp/main.cpp index 285c1d5267..38d5cfa2fe 100644 --- a/wpilibcExamples/src/test/cpp/examples/I2CCommunication/cpp/main.cpp +++ b/wpilibcExamples/src/test/cpp/examples/I2CCommunication/cpp/main.cpp @@ -2,10 +2,9 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include -#include "gtest/gtest.h" - /** * Runs all unit tests. */ diff --git a/wpilibcExamples/src/test/cpp/examples/PotentiometerPID/cpp/PotentiometerPIDTest.cpp b/wpilibcExamples/src/test/cpp/examples/PotentiometerPID/cpp/PotentiometerPIDTest.cpp index 8173aab917..9d2691c1d0 100644 --- a/wpilibcExamples/src/test/cpp/examples/PotentiometerPID/cpp/PotentiometerPIDTest.cpp +++ b/wpilibcExamples/src/test/cpp/examples/PotentiometerPID/cpp/PotentiometerPIDTest.cpp @@ -2,8 +2,6 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include - #include #include @@ -15,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/wpilibcExamples/src/test/cpp/examples/PotentiometerPID/cpp/main.cpp b/wpilibcExamples/src/test/cpp/examples/PotentiometerPID/cpp/main.cpp index 285c1d5267..38d5cfa2fe 100644 --- a/wpilibcExamples/src/test/cpp/examples/PotentiometerPID/cpp/main.cpp +++ b/wpilibcExamples/src/test/cpp/examples/PotentiometerPID/cpp/main.cpp @@ -2,10 +2,9 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include -#include "gtest/gtest.h" - /** * Runs all unit tests. */ diff --git a/wpilibcExamples/src/test/cpp/examples/UltrasonicPID/cpp/UltrasonicPIDTest.cpp b/wpilibcExamples/src/test/cpp/examples/UltrasonicPID/cpp/UltrasonicPIDTest.cpp index 47d3ac386d..a970a3a1bc 100644 --- a/wpilibcExamples/src/test/cpp/examples/UltrasonicPID/cpp/UltrasonicPIDTest.cpp +++ b/wpilibcExamples/src/test/cpp/examples/UltrasonicPID/cpp/UltrasonicPIDTest.cpp @@ -2,8 +2,6 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include - #include #include @@ -15,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/wpilibcExamples/src/test/cpp/examples/UltrasonicPID/cpp/main.cpp b/wpilibcExamples/src/test/cpp/examples/UltrasonicPID/cpp/main.cpp index 285c1d5267..38d5cfa2fe 100644 --- a/wpilibcExamples/src/test/cpp/examples/UltrasonicPID/cpp/main.cpp +++ b/wpilibcExamples/src/test/cpp/examples/UltrasonicPID/cpp/main.cpp @@ -2,10 +2,9 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include -#include "gtest/gtest.h" - /** * Runs all unit tests. */ diff --git a/wpilibcExamples/src/test/cpp/examples/UnitTest/cpp/main.cpp b/wpilibcExamples/src/test/cpp/examples/UnitTest/cpp/main.cpp index 285c1d5267..38d5cfa2fe 100644 --- a/wpilibcExamples/src/test/cpp/examples/UnitTest/cpp/main.cpp +++ b/wpilibcExamples/src/test/cpp/examples/UnitTest/cpp/main.cpp @@ -2,10 +2,9 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include -#include "gtest/gtest.h" - /** * Runs all unit tests. */ diff --git a/wpilibcExamples/src/test/cpp/examples/UnitTest/cpp/subsystems/IntakeTest.cpp b/wpilibcExamples/src/test/cpp/examples/UnitTest/cpp/subsystems/IntakeTest.cpp index ae1d786c3f..6b5650ae4b 100644 --- a/wpilibcExamples/src/test/cpp/examples/UnitTest/cpp/subsystems/IntakeTest.cpp +++ b/wpilibcExamples/src/test/cpp/examples/UnitTest/cpp/subsystems/IntakeTest.cpp @@ -2,11 +2,10 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include - #include #include #include +#include #include "Constants.h" #include "subsystems/Intake.h" diff --git a/wpilibcIntegrationTests/src/main/native/cpp/AnalogLoopTest.cpp b/wpilibcIntegrationTests/src/main/native/cpp/AnalogLoopTest.cpp index 3540095b0c..cf3f30fb24 100644 --- a/wpilibcIntegrationTests/src/main/native/cpp/AnalogLoopTest.cpp +++ b/wpilibcIntegrationTests/src/main/native/cpp/AnalogLoopTest.cpp @@ -2,6 +2,7 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include #include "TestBench.h" @@ -11,7 +12,6 @@ #include "frc/AsynchronousInterrupt.h" #include "frc/Counter.h" #include "frc/Timer.h" -#include "gtest/gtest.h" static constexpr auto kDelayTime = 10_ms; diff --git a/wpilibcIntegrationTests/src/main/native/cpp/AnalogPotentiometerTest.cpp b/wpilibcIntegrationTests/src/main/native/cpp/AnalogPotentiometerTest.cpp index 107310fdbb..39aee79968 100644 --- a/wpilibcIntegrationTests/src/main/native/cpp/AnalogPotentiometerTest.cpp +++ b/wpilibcIntegrationTests/src/main/native/cpp/AnalogPotentiometerTest.cpp @@ -4,11 +4,12 @@ #include "frc/AnalogPotentiometer.h" // NOLINT(build/include_order) +#include + #include "TestBench.h" #include "frc/AnalogOutput.h" #include "frc/RobotController.h" #include "frc/Timer.h" -#include "gtest/gtest.h" static constexpr double kScale = 270.0; static constexpr double kAngle = 180.0; diff --git a/wpilibcIntegrationTests/src/main/native/cpp/BuiltInAccelerometerTest.cpp b/wpilibcIntegrationTests/src/main/native/cpp/BuiltInAccelerometerTest.cpp index 00f5f00588..9086afa591 100644 --- a/wpilibcIntegrationTests/src/main/native/cpp/BuiltInAccelerometerTest.cpp +++ b/wpilibcIntegrationTests/src/main/native/cpp/BuiltInAccelerometerTest.cpp @@ -4,8 +4,9 @@ #include "frc/BuiltInAccelerometer.h" // NOLINT(build/include_order) +#include + #include "frc/Timer.h" -#include "gtest/gtest.h" static constexpr double kAccelerationTolerance = 0.1; diff --git a/wpilibcIntegrationTests/src/main/native/cpp/CounterTest.cpp b/wpilibcIntegrationTests/src/main/native/cpp/CounterTest.cpp index 553fc96197..e562d6af80 100644 --- a/wpilibcIntegrationTests/src/main/native/cpp/CounterTest.cpp +++ b/wpilibcIntegrationTests/src/main/native/cpp/CounterTest.cpp @@ -4,6 +4,7 @@ #include "frc/Counter.h" // NOLINT(build/include_order) +#include #include #include "TestBench.h" @@ -11,7 +12,6 @@ #include "frc/motorcontrol/Jaguar.h" #include "frc/motorcontrol/Talon.h" #include "frc/motorcontrol/Victor.h" -#include "gtest/gtest.h" static constexpr auto kMotorDelay = 2.5_s; diff --git a/wpilibcIntegrationTests/src/main/native/cpp/DIOLoopTest.cpp b/wpilibcIntegrationTests/src/main/native/cpp/DIOLoopTest.cpp index e230310a5b..a810be92e7 100644 --- a/wpilibcIntegrationTests/src/main/native/cpp/DIOLoopTest.cpp +++ b/wpilibcIntegrationTests/src/main/native/cpp/DIOLoopTest.cpp @@ -6,6 +6,7 @@ #include "frc/DigitalOutput.h" // NOLINT(build/include_order) +#include #include #include @@ -14,7 +15,6 @@ #include "frc/Counter.h" #include "frc/SynchronousInterrupt.h" #include "frc/Timer.h" -#include "gtest/gtest.h" #define EXPECT_NEAR_UNITS(val1, val2, eps) \ EXPECT_LE(units::math::abs(val1 - val2), eps) diff --git a/wpilibcIntegrationTests/src/main/native/cpp/DMATest.cpp b/wpilibcIntegrationTests/src/main/native/cpp/DMATest.cpp index 39116db946..30a1caf558 100644 --- a/wpilibcIntegrationTests/src/main/native/cpp/DMATest.cpp +++ b/wpilibcIntegrationTests/src/main/native/cpp/DMATest.cpp @@ -8,10 +8,11 @@ #include #include +#include + #include "TestBench.h" #include "frc/DMA.h" #include "frc/DMASample.h" -#include "gtest/gtest.h" using namespace frc; diff --git a/wpilibcIntegrationTests/src/main/native/cpp/DigitalGlitchFilterTest.cpp b/wpilibcIntegrationTests/src/main/native/cpp/DigitalGlitchFilterTest.cpp index 1081f2ecf7..913f654bc4 100644 --- a/wpilibcIntegrationTests/src/main/native/cpp/DigitalGlitchFilterTest.cpp +++ b/wpilibcIntegrationTests/src/main/native/cpp/DigitalGlitchFilterTest.cpp @@ -4,10 +4,11 @@ #include "frc/DigitalGlitchFilter.h" // NOLINT(build/include_order) +#include + #include "frc/Counter.h" #include "frc/DigitalInput.h" #include "frc/Encoder.h" -#include "gtest/gtest.h" /** * Tests that configuring inputs to be filtered succeeds. diff --git a/wpilibcIntegrationTests/src/main/native/cpp/DriverStationTest.cpp b/wpilibcIntegrationTests/src/main/native/cpp/DriverStationTest.cpp index 0369717533..68f8cb2a1e 100644 --- a/wpilibcIntegrationTests/src/main/native/cpp/DriverStationTest.cpp +++ b/wpilibcIntegrationTests/src/main/native/cpp/DriverStationTest.cpp @@ -4,13 +4,13 @@ #include "frc/DriverStation.h" // NOLINT(build/include_order) +#include #include #include #include #include "TestBench.h" #include "frc/RobotController.h" -#include "gtest/gtest.h" #define EXPECT_NEAR_UNITS(val1, val2, eps) \ EXPECT_LE(units::math::abs(val1 - val2), eps) diff --git a/wpilibcIntegrationTests/src/main/native/cpp/FakeEncoderTest.cpp b/wpilibcIntegrationTests/src/main/native/cpp/FakeEncoderTest.cpp index 66f81e0d2e..0d4999fe19 100644 --- a/wpilibcIntegrationTests/src/main/native/cpp/FakeEncoderTest.cpp +++ b/wpilibcIntegrationTests/src/main/native/cpp/FakeEncoderTest.cpp @@ -4,6 +4,7 @@ #include "frc/Encoder.h" // NOLINT(build/include_order) +#include #include #include "TestBench.h" @@ -11,7 +12,6 @@ #include "frc/AnalogTrigger.h" #include "frc/DigitalOutput.h" #include "frc/Timer.h" -#include "gtest/gtest.h" static constexpr auto kDelayTime = 1_ms; diff --git a/wpilibcIntegrationTests/src/main/native/cpp/Main.cpp b/wpilibcIntegrationTests/src/main/native/cpp/Main.cpp index 95bc5b5ec3..70e9d83a6e 100644 --- a/wpilibcIntegrationTests/src/main/native/cpp/Main.cpp +++ b/wpilibcIntegrationTests/src/main/native/cpp/Main.cpp @@ -2,7 +2,7 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include "gtest/gtest.h" +#include int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); diff --git a/wpilibcIntegrationTests/src/main/native/cpp/MotorEncoderTest.cpp b/wpilibcIntegrationTests/src/main/native/cpp/MotorEncoderTest.cpp index 46e2120b30..c1e59c3c59 100644 --- a/wpilibcIntegrationTests/src/main/native/cpp/MotorEncoderTest.cpp +++ b/wpilibcIntegrationTests/src/main/native/cpp/MotorEncoderTest.cpp @@ -4,6 +4,7 @@ #include +#include #include #include "TestBench.h" @@ -15,7 +16,6 @@ #include "frc/motorcontrol/Jaguar.h" #include "frc/motorcontrol/Talon.h" #include "frc/motorcontrol/Victor.h" -#include "gtest/gtest.h" enum MotorEncoderTestType { TEST_VICTOR, TEST_JAGUAR, TEST_TALON }; diff --git a/wpilibcIntegrationTests/src/main/native/cpp/MotorInvertingTest.cpp b/wpilibcIntegrationTests/src/main/native/cpp/MotorInvertingTest.cpp index 10ccd34d59..870f029f9d 100644 --- a/wpilibcIntegrationTests/src/main/native/cpp/MotorInvertingTest.cpp +++ b/wpilibcIntegrationTests/src/main/native/cpp/MotorInvertingTest.cpp @@ -2,6 +2,7 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include #include "TestBench.h" @@ -10,7 +11,6 @@ #include "frc/motorcontrol/Jaguar.h" #include "frc/motorcontrol/Talon.h" #include "frc/motorcontrol/Victor.h" -#include "gtest/gtest.h" enum MotorInvertingTestType { TEST_VICTOR, TEST_JAGUAR, TEST_TALON }; diff --git a/wpilibcIntegrationTests/src/main/native/cpp/NotifierTest.cpp b/wpilibcIntegrationTests/src/main/native/cpp/NotifierTest.cpp index eaaaf7e0fa..ca7fb8499f 100644 --- a/wpilibcIntegrationTests/src/main/native/cpp/NotifierTest.cpp +++ b/wpilibcIntegrationTests/src/main/native/cpp/NotifierTest.cpp @@ -5,9 +5,9 @@ #include "frc/Notifier.h" // NOLINT(build/include_order) #include +#include #include "frc/Timer.h" -#include "gtest/gtest.h" TEST(NotifierTest, StartPeriodicAndStop) { uint32_t counter = 0; diff --git a/wpilibcIntegrationTests/src/main/native/cpp/PCMTest.cpp b/wpilibcIntegrationTests/src/main/native/cpp/PCMTest.cpp index ea271a5dc8..4d1460312b 100644 --- a/wpilibcIntegrationTests/src/main/native/cpp/PCMTest.cpp +++ b/wpilibcIntegrationTests/src/main/native/cpp/PCMTest.cpp @@ -2,6 +2,8 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include + #include "TestBench.h" #include "frc/AnalogInput.h" #include "frc/DigitalInput.h" @@ -10,7 +12,6 @@ #include "frc/PneumaticsControlModule.h" #include "frc/Solenoid.h" #include "frc/Timer.h" -#include "gtest/gtest.h" /* The PCM switches the compressor up to a couple seconds after the pressure switch changes. */ diff --git a/wpilibcIntegrationTests/src/main/native/cpp/PowerDistributionPanelTest.cpp b/wpilibcIntegrationTests/src/main/native/cpp/PowerDistributionPanelTest.cpp index 4697553919..bd7373919a 100644 --- a/wpilibcIntegrationTests/src/main/native/cpp/PowerDistributionPanelTest.cpp +++ b/wpilibcIntegrationTests/src/main/native/cpp/PowerDistributionPanelTest.cpp @@ -4,13 +4,13 @@ #include "frc/PowerDistribution.h" // NOLINT(build/include_order) +#include #include #include #include "TestBench.h" #include "frc/Timer.h" #include "frc/motorcontrol/Talon.h" -#include "gtest/gtest.h" static constexpr auto kMotorTime = 0.25_s; diff --git a/wpilibcIntegrationTests/src/main/native/cpp/PreferencesTest.cpp b/wpilibcIntegrationTests/src/main/native/cpp/PreferencesTest.cpp index 78d9c43837..ef58bb4bed 100644 --- a/wpilibcIntegrationTests/src/main/native/cpp/PreferencesTest.cpp +++ b/wpilibcIntegrationTests/src/main/native/cpp/PreferencesTest.cpp @@ -7,13 +7,13 @@ #include #include +#include #include #include #include #include #include "frc/Timer.h" -#include "gtest/gtest.h" static const char* kFileName = "networktables.json"; static constexpr auto kSaveTime = 1.2_s; diff --git a/wpilibcIntegrationTests/src/main/native/cpp/PriorityTest.cpp b/wpilibcIntegrationTests/src/main/native/cpp/PriorityTest.cpp index 3085bed3f4..85a42a498a 100644 --- a/wpilibcIntegrationTests/src/main/native/cpp/PriorityTest.cpp +++ b/wpilibcIntegrationTests/src/main/native/cpp/PriorityTest.cpp @@ -4,11 +4,11 @@ #include +#include #include #include #include "frc/Threads.h" -#include "gtest/gtest.h" TEST(PriorityTest, SetThreadPriority) { bool exited = false; diff --git a/wpilibcIntegrationTests/src/main/native/cpp/RelayTest.cpp b/wpilibcIntegrationTests/src/main/native/cpp/RelayTest.cpp index cf3cfdf37f..7e5c8d2106 100644 --- a/wpilibcIntegrationTests/src/main/native/cpp/RelayTest.cpp +++ b/wpilibcIntegrationTests/src/main/native/cpp/RelayTest.cpp @@ -4,12 +4,12 @@ #include "frc/Relay.h" // NOLINT(build/include_order) +#include #include #include "TestBench.h" #include "frc/DigitalInput.h" #include "frc/Timer.h" -#include "gtest/gtest.h" static constexpr auto kDelayTime = 10_ms; diff --git a/wpilibcIntegrationTests/src/main/native/cpp/TestEnvironment.cpp b/wpilibcIntegrationTests/src/main/native/cpp/TestEnvironment.cpp index 59a3a58443..91f27b91a8 100644 --- a/wpilibcIntegrationTests/src/main/native/cpp/TestEnvironment.cpp +++ b/wpilibcIntegrationTests/src/main/native/cpp/TestEnvironment.cpp @@ -6,11 +6,11 @@ #include #include +#include #include #include "frc/DriverStation.h" #include "frc/livewindow/LiveWindow.h" -#include "gtest/gtest.h" #include "mockds/MockDS.h" using namespace std::chrono_literals; diff --git a/wpilibcIntegrationTests/src/main/native/cpp/TiltPanCameraTest.cpp b/wpilibcIntegrationTests/src/main/native/cpp/TiltPanCameraTest.cpp index 42e52fc9b0..dfa2664ead 100644 --- a/wpilibcIntegrationTests/src/main/native/cpp/TiltPanCameraTest.cpp +++ b/wpilibcIntegrationTests/src/main/native/cpp/TiltPanCameraTest.cpp @@ -4,6 +4,7 @@ #include +#include #include #include "TestBench.h" @@ -11,7 +12,6 @@ #include "frc/AnalogGyro.h" #include "frc/Servo.h" #include "frc/Timer.h" -#include "gtest/gtest.h" static constexpr double kTiltSetpoint0 = 0.22; static constexpr double kTiltSetpoint45 = 0.45; diff --git a/wpilibcIntegrationTests/src/main/native/cpp/TimerTest.cpp b/wpilibcIntegrationTests/src/main/native/cpp/TimerTest.cpp index 99ec9f5352..e48425a43c 100644 --- a/wpilibcIntegrationTests/src/main/native/cpp/TimerTest.cpp +++ b/wpilibcIntegrationTests/src/main/native/cpp/TimerTest.cpp @@ -4,10 +4,9 @@ #include "frc/Timer.h" // NOLINT(build/include_order) +#include #include -#include "gtest/gtest.h" - #define EXPECT_NEAR_UNITS(val1, val2, eps) \ EXPECT_LE(units::math::abs(val1 - val2), eps) diff --git a/wpimath/.styleguide b/wpimath/.styleguide index 6ae8bbfc3f..257b50bcae 100644 --- a/wpimath/.styleguide +++ b/wpimath/.styleguide @@ -34,14 +34,14 @@ includeGuardRoots { } includeOtherLibs { + ^Eigen/ ^fmt/ + ^gcem/ + ^gtest/ + ^unsupported/ ^wpi/ } includeProject { - ^gcem/ - ^drake/ - ^Eigen/ ^units/ - ^unsupported/ } diff --git a/wpimath/src/main/native/cpp/controller/DifferentialDriveAccelerationLimiter.cpp b/wpimath/src/main/native/cpp/controller/DifferentialDriveAccelerationLimiter.cpp index 978802304c..05be6459f8 100644 --- a/wpimath/src/main/native/cpp/controller/DifferentialDriveAccelerationLimiter.cpp +++ b/wpimath/src/main/native/cpp/controller/DifferentialDriveAccelerationLimiter.cpp @@ -6,7 +6,7 @@ #include -#include "Eigen/QR" +#include using namespace frc; diff --git a/wpimath/src/main/native/cpp/controller/LTVDifferentialDriveController.cpp b/wpimath/src/main/native/cpp/controller/LTVDifferentialDriveController.cpp index 13c5832008..173f2ea7bd 100644 --- a/wpimath/src/main/native/cpp/controller/LTVDifferentialDriveController.cpp +++ b/wpimath/src/main/native/cpp/controller/LTVDifferentialDriveController.cpp @@ -7,7 +7,8 @@ #include #include -#include "Eigen/Cholesky" +#include + #include "frc/DARE.h" #include "frc/MathUtil.h" #include "frc/StateSpaceUtil.h" diff --git a/wpimath/src/main/native/cpp/controller/LTVUnicycleController.cpp b/wpimath/src/main/native/cpp/controller/LTVUnicycleController.cpp index 4f482471c0..aca317a4bb 100644 --- a/wpimath/src/main/native/cpp/controller/LTVUnicycleController.cpp +++ b/wpimath/src/main/native/cpp/controller/LTVUnicycleController.cpp @@ -6,7 +6,8 @@ #include -#include "Eigen/Cholesky" +#include + #include "frc/DARE.h" #include "frc/StateSpaceUtil.h" #include "frc/system/Discretization.h" diff --git a/wpimath/src/main/native/cpp/geometry/CoordinateSystem.cpp b/wpimath/src/main/native/cpp/geometry/CoordinateSystem.cpp index 4b3c20a4c0..400a5e5617 100644 --- a/wpimath/src/main/native/cpp/geometry/CoordinateSystem.cpp +++ b/wpimath/src/main/native/cpp/geometry/CoordinateSystem.cpp @@ -8,7 +8,7 @@ #include #include -#include "Eigen/QR" +#include using namespace frc; diff --git a/wpimath/src/main/native/cpp/geometry/Rotation3d.cpp b/wpimath/src/main/native/cpp/geometry/Rotation3d.cpp index e50995db32..a898d0d577 100644 --- a/wpimath/src/main/native/cpp/geometry/Rotation3d.cpp +++ b/wpimath/src/main/native/cpp/geometry/Rotation3d.cpp @@ -7,11 +7,11 @@ #include #include +#include +#include +#include #include -#include "Eigen/Core" -#include "Eigen/LU" -#include "Eigen/QR" #include "frc/fmt/Eigen.h" #include "units/math.h" #include "wpimath/MathShared.h" diff --git a/wpimath/src/main/native/cpp/jni/WPIMathJNI.cpp b/wpimath/src/main/native/cpp/jni/WPIMathJNI.cpp index d9a4969628..56461cec76 100644 --- a/wpimath/src/main/native/cpp/jni/WPIMathJNI.cpp +++ b/wpimath/src/main/native/cpp/jni/WPIMathJNI.cpp @@ -7,16 +7,16 @@ #include #include +#include +#include +#include +#include #include -#include "Eigen/Cholesky" -#include "Eigen/Core" -#include "Eigen/QR" #include "edu_wpi_first_math_WPIMathJNI.h" #include "frc/DARE.h" #include "frc/geometry/Pose3d.h" #include "frc/trajectory/TrajectoryUtil.h" -#include "unsupported/Eigen/MatrixFunctions" using namespace wpi::java; diff --git a/wpimath/src/main/native/include/frc/DARE.h b/wpimath/src/main/native/include/frc/DARE.h index cc7c141d6f..4ac18a5773 100644 --- a/wpimath/src/main/native/include/frc/DARE.h +++ b/wpimath/src/main/native/include/frc/DARE.h @@ -7,9 +7,10 @@ #include #include -#include "Eigen/Cholesky" -#include "Eigen/Core" -#include "Eigen/LU" +#include +#include +#include + #include "frc/StateSpaceUtil.h" #include "frc/fmt/Eigen.h" diff --git a/wpimath/src/main/native/include/frc/EigenCore.h b/wpimath/src/main/native/include/frc/EigenCore.h index b33e9e23fb..1604a0de7c 100644 --- a/wpimath/src/main/native/include/frc/EigenCore.h +++ b/wpimath/src/main/native/include/frc/EigenCore.h @@ -4,7 +4,7 @@ #pragma once -#include "Eigen/Core" +#include namespace frc { diff --git a/wpimath/src/main/native/include/frc/StateSpaceUtil.h b/wpimath/src/main/native/include/frc/StateSpaceUtil.h index bbcac4fe9b..aefc2f12f7 100644 --- a/wpimath/src/main/native/include/frc/StateSpaceUtil.h +++ b/wpimath/src/main/native/include/frc/StateSpaceUtil.h @@ -10,11 +10,11 @@ #include #include +#include +#include #include #include -#include "Eigen/Eigenvalues" -#include "Eigen/QR" #include "frc/EigenCore.h" #include "frc/geometry/Pose2d.h" diff --git a/wpimath/src/main/native/include/frc/controller/ControlAffinePlantInversionFeedforward.h b/wpimath/src/main/native/include/frc/controller/ControlAffinePlantInversionFeedforward.h index 21aad251e7..ee21a24023 100644 --- a/wpimath/src/main/native/include/frc/controller/ControlAffinePlantInversionFeedforward.h +++ b/wpimath/src/main/native/include/frc/controller/ControlAffinePlantInversionFeedforward.h @@ -7,7 +7,8 @@ #include #include -#include "Eigen/QR" +#include + #include "frc/EigenCore.h" #include "frc/system/NumericalJacobian.h" #include "units/time.h" diff --git a/wpimath/src/main/native/include/frc/controller/DifferentialDriveAccelerationLimiter.h b/wpimath/src/main/native/include/frc/controller/DifferentialDriveAccelerationLimiter.h index 3a5148a4b1..d84e3cee8d 100644 --- a/wpimath/src/main/native/include/frc/controller/DifferentialDriveAccelerationLimiter.h +++ b/wpimath/src/main/native/include/frc/controller/DifferentialDriveAccelerationLimiter.h @@ -4,9 +4,9 @@ #pragma once +#include #include -#include "Eigen/Core" #include "frc/controller/DifferentialDriveWheelVoltages.h" #include "frc/system/LinearSystem.h" #include "units/acceleration.h" diff --git a/wpimath/src/main/native/include/frc/controller/ImplicitModelFollower.h b/wpimath/src/main/native/include/frc/controller/ImplicitModelFollower.h index eef1fc0d10..3a1230d4bc 100644 --- a/wpimath/src/main/native/include/frc/controller/ImplicitModelFollower.h +++ b/wpimath/src/main/native/include/frc/controller/ImplicitModelFollower.h @@ -6,7 +6,8 @@ #include -#include "Eigen/QR" +#include + #include "frc/EigenCore.h" #include "units/time.h" diff --git a/wpimath/src/main/native/include/frc/controller/LinearPlantInversionFeedforward.h b/wpimath/src/main/native/include/frc/controller/LinearPlantInversionFeedforward.h index d4cc3c426d..e1f6b1be39 100644 --- a/wpimath/src/main/native/include/frc/controller/LinearPlantInversionFeedforward.h +++ b/wpimath/src/main/native/include/frc/controller/LinearPlantInversionFeedforward.h @@ -7,7 +7,8 @@ #include #include -#include "Eigen/QR" +#include + #include "frc/EigenCore.h" #include "frc/system/Discretization.h" #include "frc/system/LinearSystem.h" diff --git a/wpimath/src/main/native/include/frc/controller/LinearQuadraticRegulator.inc b/wpimath/src/main/native/include/frc/controller/LinearQuadraticRegulator.inc index 8536f74b50..1871244db5 100644 --- a/wpimath/src/main/native/include/frc/controller/LinearQuadraticRegulator.inc +++ b/wpimath/src/main/native/include/frc/controller/LinearQuadraticRegulator.inc @@ -7,13 +7,14 @@ #include #include -#include "Eigen/Cholesky" +#include +#include + #include "frc/DARE.h" #include "frc/StateSpaceUtil.h" #include "frc/controller/LinearQuadraticRegulator.h" #include "frc/fmt/Eigen.h" #include "frc/system/Discretization.h" -#include "unsupported/Eigen/MatrixFunctions" #include "wpimath/MathShared.h" namespace frc { diff --git a/wpimath/src/main/native/include/frc/estimator/ExtendedKalmanFilter.inc b/wpimath/src/main/native/include/frc/estimator/ExtendedKalmanFilter.inc index 882e4dfe08..0b0e9de4a3 100644 --- a/wpimath/src/main/native/include/frc/estimator/ExtendedKalmanFilter.inc +++ b/wpimath/src/main/native/include/frc/estimator/ExtendedKalmanFilter.inc @@ -6,7 +6,8 @@ #include -#include "Eigen/Cholesky" +#include + #include "frc/DARE.h" #include "frc/StateSpaceUtil.h" #include "frc/estimator/ExtendedKalmanFilter.h" diff --git a/wpimath/src/main/native/include/frc/estimator/KalmanFilter.inc b/wpimath/src/main/native/include/frc/estimator/KalmanFilter.inc index 38bf523d63..7506c0d7b7 100644 --- a/wpimath/src/main/native/include/frc/estimator/KalmanFilter.inc +++ b/wpimath/src/main/native/include/frc/estimator/KalmanFilter.inc @@ -10,7 +10,8 @@ #include #include -#include "Eigen/Cholesky" +#include + #include "frc/DARE.h" #include "frc/StateSpaceUtil.h" #include "frc/estimator/KalmanFilter.h" diff --git a/wpimath/src/main/native/include/frc/estimator/UnscentedKalmanFilter.inc b/wpimath/src/main/native/include/frc/estimator/UnscentedKalmanFilter.inc index 7c44e7f526..c693197017 100644 --- a/wpimath/src/main/native/include/frc/estimator/UnscentedKalmanFilter.inc +++ b/wpimath/src/main/native/include/frc/estimator/UnscentedKalmanFilter.inc @@ -6,7 +6,8 @@ #include -#include "Eigen/Cholesky" +#include + #include "frc/StateSpaceUtil.h" #include "frc/estimator/UnscentedKalmanFilter.h" #include "frc/estimator/UnscentedTransform.h" diff --git a/wpimath/src/main/native/include/frc/estimator/UnscentedTransform.h b/wpimath/src/main/native/include/frc/estimator/UnscentedTransform.h index 17df925321..bec3bc841d 100644 --- a/wpimath/src/main/native/include/frc/estimator/UnscentedTransform.h +++ b/wpimath/src/main/native/include/frc/estimator/UnscentedTransform.h @@ -7,7 +7,8 @@ #include #include -#include "Eigen/QR" +#include + #include "frc/EigenCore.h" namespace frc { diff --git a/wpimath/src/main/native/include/frc/filter/LinearFilter.h b/wpimath/src/main/native/include/frc/filter/LinearFilter.h index 858cef6f87..fc558dfd58 100644 --- a/wpimath/src/main/native/include/frc/filter/LinearFilter.h +++ b/wpimath/src/main/native/include/frc/filter/LinearFilter.h @@ -11,10 +11,10 @@ #include #include +#include #include #include -#include "Eigen/QR" #include "frc/EigenCore.h" #include "units/time.h" #include "wpimath/MathShared.h" diff --git a/wpimath/src/main/native/include/frc/fmt/Eigen.h b/wpimath/src/main/native/include/frc/fmt/Eigen.h index 5bdf43a2da..2438b9f1de 100644 --- a/wpimath/src/main/native/include/frc/fmt/Eigen.h +++ b/wpimath/src/main/native/include/frc/fmt/Eigen.h @@ -6,11 +6,10 @@ #include +#include +#include #include -#include "Eigen/Core" -#include "Eigen/SparseCore" - /** * Formatter for classes derived from Eigen::MatrixBase or * Eigen::SparseCompressedBase. diff --git a/wpimath/src/main/native/include/frc/kinematics/MecanumDriveKinematics.h b/wpimath/src/main/native/include/frc/kinematics/MecanumDriveKinematics.h index 2841abfa0d..fe6eb5120a 100644 --- a/wpimath/src/main/native/include/frc/kinematics/MecanumDriveKinematics.h +++ b/wpimath/src/main/native/include/frc/kinematics/MecanumDriveKinematics.h @@ -4,9 +4,9 @@ #pragma once +#include #include -#include "Eigen/QR" #include "frc/EigenCore.h" #include "frc/geometry/Translation2d.h" #include "frc/geometry/Twist2d.h" diff --git a/wpimath/src/main/native/include/frc/kinematics/SwerveDriveKinematics.h b/wpimath/src/main/native/include/frc/kinematics/SwerveDriveKinematics.h index 4f01fd5e16..f6d4e5df26 100644 --- a/wpimath/src/main/native/include/frc/kinematics/SwerveDriveKinematics.h +++ b/wpimath/src/main/native/include/frc/kinematics/SwerveDriveKinematics.h @@ -7,10 +7,10 @@ #include #include +#include #include #include -#include "Eigen/QR" #include "frc/EigenCore.h" #include "frc/geometry/Rotation2d.h" #include "frc/geometry/Translation2d.h" diff --git a/wpimath/src/main/native/include/frc/system/Discretization.h b/wpimath/src/main/native/include/frc/system/Discretization.h index 5c56f9e07a..72a3d43d7f 100644 --- a/wpimath/src/main/native/include/frc/system/Discretization.h +++ b/wpimath/src/main/native/include/frc/system/Discretization.h @@ -4,9 +4,10 @@ #pragma once +#include + #include "frc/EigenCore.h" #include "units/time.h" -#include "unsupported/Eigen/MatrixFunctions" namespace frc { diff --git a/wpimath/src/main/native/include/frc/system/NumericalIntegration.h b/wpimath/src/main/native/include/frc/system/NumericalIntegration.h index d2bf1222bb..4f7ba319ea 100644 --- a/wpimath/src/main/native/include/frc/system/NumericalIntegration.h +++ b/wpimath/src/main/native/include/frc/system/NumericalIntegration.h @@ -9,7 +9,8 @@ #include #include -#include "Eigen/Core" +#include + #include "units/time.h" namespace frc { diff --git a/wpimath/src/test/native/cpp/ComputerVisionUtilTest.cpp b/wpimath/src/test/native/cpp/ComputerVisionUtilTest.cpp index e397af1338..bbada9e322 100644 --- a/wpimath/src/test/native/cpp/ComputerVisionUtilTest.cpp +++ b/wpimath/src/test/native/cpp/ComputerVisionUtilTest.cpp @@ -2,8 +2,9 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include + #include "frc/ComputerVisionUtil.h" -#include "gtest/gtest.h" TEST(ComputerVisionUtilTest, ObjectToRobotPose) { frc::Pose3d robot{1_m, 2_m, 0_m, frc::Rotation3d{0_deg, 0_deg, 30_deg}}; diff --git a/wpimath/src/test/native/cpp/DARETest.cpp b/wpimath/src/test/native/cpp/DARETest.cpp index fb266ba801..a4f6212360 100644 --- a/wpimath/src/test/native/cpp/DARETest.cpp +++ b/wpimath/src/test/native/cpp/DARETest.cpp @@ -4,12 +4,13 @@ #include +#include +#include + #include "DARETestUtil.h" -#include "Eigen/Core" #include "frc/DARE.h" #include "frc/EigenCore.h" #include "frc/fmt/Eigen.h" -#include "gtest/gtest.h" // 2x1 extern template Eigen::Matrix frc::DARE<2, 1>( diff --git a/wpimath/src/test/native/cpp/DARETestUtil.cpp b/wpimath/src/test/native/cpp/DARETestUtil.cpp index acb023641f..452e6ceeca 100644 --- a/wpimath/src/test/native/cpp/DARETestUtil.cpp +++ b/wpimath/src/test/native/cpp/DARETestUtil.cpp @@ -4,11 +4,11 @@ #include "DARETestUtil.h" +#include #include +#include -#include "Eigen/Eigenvalues" #include "frc/fmt/Eigen.h" -#include "gtest/gtest.h" void ExpectMatrixEqual(const Eigen::MatrixXd& lhs, const Eigen::MatrixXd& rhs, double tolerance) { diff --git a/wpimath/src/test/native/cpp/DARETestUtil.h b/wpimath/src/test/native/cpp/DARETestUtil.h index 70edd25ccf..f0d2f667f1 100644 --- a/wpimath/src/test/native/cpp/DARETestUtil.h +++ b/wpimath/src/test/native/cpp/DARETestUtil.h @@ -4,7 +4,7 @@ #pragma once -#include "Eigen/Core" +#include void ExpectMatrixEqual(const Eigen::MatrixXd& lhs, const Eigen::MatrixXd& rhs, double tolerance); diff --git a/wpimath/src/test/native/cpp/EigenTest.cpp b/wpimath/src/test/native/cpp/EigenTest.cpp index 03be9b3734..20f708778a 100644 --- a/wpimath/src/test/native/cpp/EigenTest.cpp +++ b/wpimath/src/test/native/cpp/EigenTest.cpp @@ -2,9 +2,10 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include "Eigen/LU" +#include +#include + #include "frc/EigenCore.h" -#include "gtest/gtest.h" TEST(EigenTest, Multiplication) { frc::Matrixd<2, 2> m1{{2, 1}, {0, 1}}; diff --git a/wpimath/src/test/native/cpp/FormatterTest.cpp b/wpimath/src/test/native/cpp/FormatterTest.cpp index 8961811130..0b6d590498 100644 --- a/wpimath/src/test/native/cpp/FormatterTest.cpp +++ b/wpimath/src/test/native/cpp/FormatterTest.cpp @@ -5,9 +5,9 @@ #include #include +#include #include "frc/fmt/Eigen.h" -#include "gtest/gtest.h" #include "units/velocity.h" TEST(FormatterTest, Eigen) { diff --git a/wpimath/src/test/native/cpp/MathUtilTest.cpp b/wpimath/src/test/native/cpp/MathUtilTest.cpp index 54ba5b2453..cee983185b 100644 --- a/wpimath/src/test/native/cpp/MathUtilTest.cpp +++ b/wpimath/src/test/native/cpp/MathUtilTest.cpp @@ -4,8 +4,9 @@ #include +#include + #include "frc/MathUtil.h" -#include "gtest/gtest.h" #include "units/angle.h" #define EXPECT_UNITS_EQ(a, b) EXPECT_DOUBLE_EQ((a).value(), (b).value()) diff --git a/wpimath/src/test/native/cpp/StateSpaceTest.cpp b/wpimath/src/test/native/cpp/StateSpaceTest.cpp index ee7842cbb4..07907e255c 100644 --- a/wpimath/src/test/native/cpp/StateSpaceTest.cpp +++ b/wpimath/src/test/native/cpp/StateSpaceTest.cpp @@ -2,11 +2,11 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include - #include #include +#include + #include "frc/EigenCore.h" #include "frc/controller/LinearPlantInversionFeedforward.h" #include "frc/controller/LinearQuadraticRegulator.h" diff --git a/wpimath/src/test/native/cpp/StateSpaceUtilTest.cpp b/wpimath/src/test/native/cpp/StateSpaceUtilTest.cpp index 105a4346f9..758dc3034f 100644 --- a/wpimath/src/test/native/cpp/StateSpaceUtilTest.cpp +++ b/wpimath/src/test/native/cpp/StateSpaceUtilTest.cpp @@ -2,10 +2,10 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include - #include +#include + #include "frc/EigenCore.h" #include "frc/StateSpaceUtil.h" #include "frc/system/NumericalIntegration.h" diff --git a/wpimath/src/test/native/cpp/UnitsTest.cpp b/wpimath/src/test/native/cpp/UnitsTest.cpp index 95abe8ceac..2584afed76 100644 --- a/wpimath/src/test/native/cpp/UnitsTest.cpp +++ b/wpimath/src/test/native/cpp/UnitsTest.cpp @@ -7,7 +7,8 @@ #include #include -#include "gtest/gtest.h" +#include + #include "units/acceleration.h" #include "units/angle.h" #include "units/angular_acceleration.h" diff --git a/wpimath/src/test/native/cpp/controller/BangBangInputOutputTest.cpp b/wpimath/src/test/native/cpp/controller/BangBangInputOutputTest.cpp index 4dfaa0e313..f9315909eb 100644 --- a/wpimath/src/test/native/cpp/controller/BangBangInputOutputTest.cpp +++ b/wpimath/src/test/native/cpp/controller/BangBangInputOutputTest.cpp @@ -2,8 +2,9 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include + #include "frc/controller/BangBangController.h" -#include "gtest/gtest.h" class BangBangInputOutputTest : public testing::Test { protected: diff --git a/wpimath/src/test/native/cpp/controller/BangBangToleranceTest.cpp b/wpimath/src/test/native/cpp/controller/BangBangToleranceTest.cpp index e58272043f..3484e6e566 100644 --- a/wpimath/src/test/native/cpp/controller/BangBangToleranceTest.cpp +++ b/wpimath/src/test/native/cpp/controller/BangBangToleranceTest.cpp @@ -2,8 +2,9 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include + #include "frc/controller/BangBangController.h" -#include "gtest/gtest.h" class BangBangToleranceTest : public testing::Test { protected: diff --git a/wpimath/src/test/native/cpp/controller/ControlAffinePlantInversionFeedforwardTest.cpp b/wpimath/src/test/native/cpp/controller/ControlAffinePlantInversionFeedforwardTest.cpp index b2bcee6b8e..9db64daea1 100644 --- a/wpimath/src/test/native/cpp/controller/ControlAffinePlantInversionFeedforwardTest.cpp +++ b/wpimath/src/test/native/cpp/controller/ControlAffinePlantInversionFeedforwardTest.cpp @@ -2,10 +2,10 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include - #include +#include + #include "frc/EigenCore.h" #include "frc/controller/ControlAffinePlantInversionFeedforward.h" #include "units/time.h" diff --git a/wpimath/src/test/native/cpp/controller/DifferentialDriveFeedforwardTest.cpp b/wpimath/src/test/native/cpp/controller/DifferentialDriveFeedforwardTest.cpp index 74d945c351..0ae246bb4e 100644 --- a/wpimath/src/test/native/cpp/controller/DifferentialDriveFeedforwardTest.cpp +++ b/wpimath/src/test/native/cpp/controller/DifferentialDriveFeedforwardTest.cpp @@ -2,10 +2,10 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include - #include +#include + #include "frc/EigenCore.h" #include "frc/controller/DifferentialDriveFeedforward.h" #include "frc/controller/LinearPlantInversionFeedforward.h" diff --git a/wpimath/src/test/native/cpp/controller/HolonomicDriveControllerTest.cpp b/wpimath/src/test/native/cpp/controller/HolonomicDriveControllerTest.cpp index 134a4e04db..dbce6bb353 100644 --- a/wpimath/src/test/native/cpp/controller/HolonomicDriveControllerTest.cpp +++ b/wpimath/src/test/native/cpp/controller/HolonomicDriveControllerTest.cpp @@ -4,10 +4,11 @@ #include +#include + #include "frc/MathUtil.h" #include "frc/controller/HolonomicDriveController.h" #include "frc/trajectory/TrajectoryGenerator.h" -#include "gtest/gtest.h" #include "units/angular_acceleration.h" #include "units/math.h" #include "units/time.h" diff --git a/wpimath/src/test/native/cpp/controller/LTVDifferentialDriveControllerTest.cpp b/wpimath/src/test/native/cpp/controller/LTVDifferentialDriveControllerTest.cpp index 753ea34a40..d96c67b4f2 100644 --- a/wpimath/src/test/native/cpp/controller/LTVDifferentialDriveControllerTest.cpp +++ b/wpimath/src/test/native/cpp/controller/LTVDifferentialDriveControllerTest.cpp @@ -4,12 +4,13 @@ #include +#include + #include "frc/MathUtil.h" #include "frc/controller/LTVDifferentialDriveController.h" #include "frc/system/NumericalIntegration.h" #include "frc/system/plant/LinearSystemId.h" #include "frc/trajectory/TrajectoryGenerator.h" -#include "gtest/gtest.h" #include "units/math.h" #define EXPECT_NEAR_UNITS(val1, val2, eps) \ diff --git a/wpimath/src/test/native/cpp/controller/LTVUnicycleControllerTest.cpp b/wpimath/src/test/native/cpp/controller/LTVUnicycleControllerTest.cpp index 56faf1d6f0..ff2c7d3186 100644 --- a/wpimath/src/test/native/cpp/controller/LTVUnicycleControllerTest.cpp +++ b/wpimath/src/test/native/cpp/controller/LTVUnicycleControllerTest.cpp @@ -2,10 +2,11 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include + #include "frc/MathUtil.h" #include "frc/controller/LTVUnicycleController.h" #include "frc/trajectory/TrajectoryGenerator.h" -#include "gtest/gtest.h" #include "units/math.h" #define EXPECT_NEAR_UNITS(val1, val2, eps) \ diff --git a/wpimath/src/test/native/cpp/controller/LinearPlantInversionFeedforwardTest.cpp b/wpimath/src/test/native/cpp/controller/LinearPlantInversionFeedforwardTest.cpp index e7107d0a43..a92d4f0c83 100644 --- a/wpimath/src/test/native/cpp/controller/LinearPlantInversionFeedforwardTest.cpp +++ b/wpimath/src/test/native/cpp/controller/LinearPlantInversionFeedforwardTest.cpp @@ -2,10 +2,10 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include - #include +#include + #include "frc/EigenCore.h" #include "frc/controller/LinearPlantInversionFeedforward.h" #include "units/time.h" diff --git a/wpimath/src/test/native/cpp/controller/LinearQuadraticRegulatorTest.cpp b/wpimath/src/test/native/cpp/controller/LinearQuadraticRegulatorTest.cpp index 1127fc21d4..5976600fe2 100644 --- a/wpimath/src/test/native/cpp/controller/LinearQuadraticRegulatorTest.cpp +++ b/wpimath/src/test/native/cpp/controller/LinearQuadraticRegulatorTest.cpp @@ -2,10 +2,10 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include - #include +#include + #include "frc/EigenCore.h" #include "frc/controller/LinearQuadraticRegulator.h" #include "frc/system/LinearSystem.h" diff --git a/wpimath/src/test/native/cpp/controller/PIDInputOutputTest.cpp b/wpimath/src/test/native/cpp/controller/PIDInputOutputTest.cpp index a382b79d92..2b6b9fe923 100644 --- a/wpimath/src/test/native/cpp/controller/PIDInputOutputTest.cpp +++ b/wpimath/src/test/native/cpp/controller/PIDInputOutputTest.cpp @@ -2,8 +2,9 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include + #include "frc/controller/PIDController.h" -#include "gtest/gtest.h" class PIDInputOutputTest : public testing::Test { protected: diff --git a/wpimath/src/test/native/cpp/controller/PIDToleranceTest.cpp b/wpimath/src/test/native/cpp/controller/PIDToleranceTest.cpp index 4a4e0fc206..e36e93b330 100644 --- a/wpimath/src/test/native/cpp/controller/PIDToleranceTest.cpp +++ b/wpimath/src/test/native/cpp/controller/PIDToleranceTest.cpp @@ -2,8 +2,9 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include + #include "frc/controller/PIDController.h" -#include "gtest/gtest.h" static constexpr double kSetpoint = 50.0; static constexpr double kRange = 200; diff --git a/wpimath/src/test/native/cpp/controller/ProfiledPIDInputOutputTest.cpp b/wpimath/src/test/native/cpp/controller/ProfiledPIDInputOutputTest.cpp index 44d1f415c9..5e4f01a588 100644 --- a/wpimath/src/test/native/cpp/controller/ProfiledPIDInputOutputTest.cpp +++ b/wpimath/src/test/native/cpp/controller/ProfiledPIDInputOutputTest.cpp @@ -4,8 +4,9 @@ #include +#include + #include "frc/controller/ProfiledPIDController.h" -#include "gtest/gtest.h" #include "units/angle.h" #include "units/angular_acceleration.h" #include "units/angular_velocity.h" diff --git a/wpimath/src/test/native/cpp/controller/RamseteControllerTest.cpp b/wpimath/src/test/native/cpp/controller/RamseteControllerTest.cpp index 2fd26bbfc1..d39c67913b 100644 --- a/wpimath/src/test/native/cpp/controller/RamseteControllerTest.cpp +++ b/wpimath/src/test/native/cpp/controller/RamseteControllerTest.cpp @@ -2,10 +2,11 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include + #include "frc/MathUtil.h" #include "frc/controller/RamseteController.h" #include "frc/trajectory/TrajectoryGenerator.h" -#include "gtest/gtest.h" #include "units/math.h" #define EXPECT_NEAR_UNITS(val1, val2, eps) \ diff --git a/wpimath/src/test/native/cpp/controller/SimpleMotorFeedforwardTest.cpp b/wpimath/src/test/native/cpp/controller/SimpleMotorFeedforwardTest.cpp index 6d10e051d6..7878011227 100644 --- a/wpimath/src/test/native/cpp/controller/SimpleMotorFeedforwardTest.cpp +++ b/wpimath/src/test/native/cpp/controller/SimpleMotorFeedforwardTest.cpp @@ -2,10 +2,10 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include - #include +#include + #include "frc/EigenCore.h" #include "frc/controller/LinearPlantInversionFeedforward.h" #include "frc/controller/SimpleMotorFeedforward.h" diff --git a/wpimath/src/test/native/cpp/estimator/AngleStatisticsTest.cpp b/wpimath/src/test/native/cpp/estimator/AngleStatisticsTest.cpp index b2ee87dc5a..d62decda61 100644 --- a/wpimath/src/test/native/cpp/estimator/AngleStatisticsTest.cpp +++ b/wpimath/src/test/native/cpp/estimator/AngleStatisticsTest.cpp @@ -2,10 +2,10 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include - #include +#include + #include "frc/EigenCore.h" #include "frc/estimator/AngleStatistics.h" diff --git a/wpimath/src/test/native/cpp/estimator/DifferentialDrivePoseEstimatorTest.cpp b/wpimath/src/test/native/cpp/estimator/DifferentialDrivePoseEstimatorTest.cpp index 3685581f74..3103068344 100644 --- a/wpimath/src/test/native/cpp/estimator/DifferentialDrivePoseEstimatorTest.cpp +++ b/wpimath/src/test/native/cpp/estimator/DifferentialDrivePoseEstimatorTest.cpp @@ -7,13 +7,14 @@ #include #include +#include + #include "frc/StateSpaceUtil.h" #include "frc/estimator/DifferentialDrivePoseEstimator.h" #include "frc/geometry/Pose2d.h" #include "frc/geometry/Rotation2d.h" #include "frc/kinematics/DifferentialDriveKinematics.h" #include "frc/trajectory/TrajectoryGenerator.h" -#include "gtest/gtest.h" #include "units/angle.h" #include "units/length.h" #include "units/time.h" @@ -138,6 +139,7 @@ void testFollowTrajectory( 0.15); if (checkError) { + // NOLINTNEXTLINE(bugprone-integer-division) EXPECT_LT(errorSum / (trajectory.TotalTime() / dt), 0.05); EXPECT_LT(maxError, 0.2); } diff --git a/wpimath/src/test/native/cpp/estimator/ExtendedKalmanFilterTest.cpp b/wpimath/src/test/native/cpp/estimator/ExtendedKalmanFilterTest.cpp index 1924b73f39..2a5ce800cb 100644 --- a/wpimath/src/test/native/cpp/estimator/ExtendedKalmanFilterTest.cpp +++ b/wpimath/src/test/native/cpp/estimator/ExtendedKalmanFilterTest.cpp @@ -2,12 +2,12 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include - #include #include -#include "Eigen/QR" +#include +#include + #include "frc/EigenCore.h" #include "frc/StateSpaceUtil.h" #include "frc/estimator/ExtendedKalmanFilter.h" diff --git a/wpimath/src/test/native/cpp/estimator/KalmanFilterTest.cpp b/wpimath/src/test/native/cpp/estimator/KalmanFilterTest.cpp index fc373cace2..6697ec07da 100644 --- a/wpimath/src/test/native/cpp/estimator/KalmanFilterTest.cpp +++ b/wpimath/src/test/native/cpp/estimator/KalmanFilterTest.cpp @@ -2,12 +2,12 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include - #include #include -#include "Eigen/Core" +#include +#include + #include "frc/estimator/KalmanFilter.h" #include "frc/system/plant/DCMotor.h" #include "frc/system/plant/LinearSystemId.h" diff --git a/wpimath/src/test/native/cpp/estimator/MecanumDrivePoseEstimatorTest.cpp b/wpimath/src/test/native/cpp/estimator/MecanumDrivePoseEstimatorTest.cpp index 49c534473c..8b3a586892 100644 --- a/wpimath/src/test/native/cpp/estimator/MecanumDrivePoseEstimatorTest.cpp +++ b/wpimath/src/test/native/cpp/estimator/MecanumDrivePoseEstimatorTest.cpp @@ -6,11 +6,12 @@ #include #include +#include + #include "frc/estimator/MecanumDrivePoseEstimator.h" #include "frc/geometry/Pose2d.h" #include "frc/kinematics/MecanumDriveKinematics.h" #include "frc/trajectory/TrajectoryGenerator.h" -#include "gtest/gtest.h" void testFollowTrajectory( const frc::MecanumDriveKinematics& kinematics, @@ -129,6 +130,7 @@ void testFollowTrajectory( 0.15); if (checkError) { + // NOLINTNEXTLINE(bugprone-integer-division) EXPECT_LT(errorSum / (trajectory.TotalTime() / dt), 0.051); EXPECT_LT(maxError, 0.2); } diff --git a/wpimath/src/test/native/cpp/estimator/SwerveDrivePoseEstimatorTest.cpp b/wpimath/src/test/native/cpp/estimator/SwerveDrivePoseEstimatorTest.cpp index 275a0f0f67..f1024efbc9 100644 --- a/wpimath/src/test/native/cpp/estimator/SwerveDrivePoseEstimatorTest.cpp +++ b/wpimath/src/test/native/cpp/estimator/SwerveDrivePoseEstimatorTest.cpp @@ -8,13 +8,13 @@ #include #include +#include #include #include "frc/estimator/SwerveDrivePoseEstimator.h" #include "frc/geometry/Pose2d.h" #include "frc/kinematics/SwerveDriveKinematics.h" #include "frc/trajectory/TrajectoryGenerator.h" -#include "gtest/gtest.h" void testFollowTrajectory( const frc::SwerveDriveKinematics<4>& kinematics, @@ -133,6 +133,7 @@ void testFollowTrajectory( 0.15); if (checkError) { + // NOLINTNEXTLINE(bugprone-integer-division) EXPECT_LT(errorSum / (trajectory.TotalTime() / dt), 0.058); EXPECT_LT(maxError, 0.2); } diff --git a/wpimath/src/test/native/cpp/estimator/UnscentedKalmanFilterTest.cpp b/wpimath/src/test/native/cpp/estimator/UnscentedKalmanFilterTest.cpp index 68f9c40152..0f97a88008 100644 --- a/wpimath/src/test/native/cpp/estimator/UnscentedKalmanFilterTest.cpp +++ b/wpimath/src/test/native/cpp/estimator/UnscentedKalmanFilterTest.cpp @@ -2,12 +2,12 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include - #include #include -#include "Eigen/QR" +#include +#include + #include "frc/EigenCore.h" #include "frc/StateSpaceUtil.h" #include "frc/estimator/AngleStatistics.h" diff --git a/wpimath/src/test/native/cpp/filter/DebouncerTest.cpp b/wpimath/src/test/native/cpp/filter/DebouncerTest.cpp index 2f64908af0..d232739b7a 100644 --- a/wpimath/src/test/native/cpp/filter/DebouncerTest.cpp +++ b/wpimath/src/test/native/cpp/filter/DebouncerTest.cpp @@ -2,10 +2,10 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include #include "frc/filter/Debouncer.h" -#include "gtest/gtest.h" #include "units/time.h" static units::second_t now = 0_s; diff --git a/wpimath/src/test/native/cpp/filter/LinearFilterNoiseTest.cpp b/wpimath/src/test/native/cpp/filter/LinearFilterNoiseTest.cpp index 8299a7106f..e0dea2df15 100644 --- a/wpimath/src/test/native/cpp/filter/LinearFilterNoiseTest.cpp +++ b/wpimath/src/test/native/cpp/filter/LinearFilterNoiseTest.cpp @@ -8,7 +8,8 @@ #include #include -#include "gtest/gtest.h" +#include + #include "units/time.h" // Filter constants diff --git a/wpimath/src/test/native/cpp/filter/LinearFilterOutputTest.cpp b/wpimath/src/test/native/cpp/filter/LinearFilterOutputTest.cpp index 152737d369..919552534d 100644 --- a/wpimath/src/test/native/cpp/filter/LinearFilterOutputTest.cpp +++ b/wpimath/src/test/native/cpp/filter/LinearFilterOutputTest.cpp @@ -10,9 +10,9 @@ #include #include +#include #include -#include "gtest/gtest.h" #include "units/time.h" // Filter constants diff --git a/wpimath/src/test/native/cpp/filter/MedianFilterTest.cpp b/wpimath/src/test/native/cpp/filter/MedianFilterTest.cpp index 8151a45ea2..f0f7d991dd 100644 --- a/wpimath/src/test/native/cpp/filter/MedianFilterTest.cpp +++ b/wpimath/src/test/native/cpp/filter/MedianFilterTest.cpp @@ -2,8 +2,9 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include + #include "frc/filter/MedianFilter.h" -#include "gtest/gtest.h" TEST(MedianFilterTest, MedianFilterNotFullTestEven) { frc::MedianFilter filter{10}; diff --git a/wpimath/src/test/native/cpp/filter/SlewRateLimiterTest.cpp b/wpimath/src/test/native/cpp/filter/SlewRateLimiterTest.cpp index 5dbe8c8847..9657543de4 100644 --- a/wpimath/src/test/native/cpp/filter/SlewRateLimiterTest.cpp +++ b/wpimath/src/test/native/cpp/filter/SlewRateLimiterTest.cpp @@ -2,10 +2,10 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include #include #include "frc/filter/SlewRateLimiter.h" -#include "gtest/gtest.h" #include "units/length.h" #include "units/time.h" #include "units/velocity.h" diff --git a/wpimath/src/test/native/cpp/geometry/CoordinateSystemTest.cpp b/wpimath/src/test/native/cpp/geometry/CoordinateSystemTest.cpp index 28d0dd0fff..198f90f7a6 100644 --- a/wpimath/src/test/native/cpp/geometry/CoordinateSystemTest.cpp +++ b/wpimath/src/test/native/cpp/geometry/CoordinateSystemTest.cpp @@ -2,10 +2,11 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include + #include "frc/geometry/CoordinateSystem.h" #include "frc/geometry/Pose3d.h" #include "frc/geometry/Transform3d.h" -#include "gtest/gtest.h" using namespace frc; diff --git a/wpimath/src/test/native/cpp/geometry/Pose2dTest.cpp b/wpimath/src/test/native/cpp/geometry/Pose2dTest.cpp index ba250624d0..bd5a9aa8a2 100644 --- a/wpimath/src/test/native/cpp/geometry/Pose2dTest.cpp +++ b/wpimath/src/test/native/cpp/geometry/Pose2dTest.cpp @@ -5,8 +5,9 @@ #include #include +#include + #include "frc/geometry/Pose2d.h" -#include "gtest/gtest.h" using namespace frc; diff --git a/wpimath/src/test/native/cpp/geometry/Pose3dTest.cpp b/wpimath/src/test/native/cpp/geometry/Pose3dTest.cpp index 8f0f91ef11..6d689db68b 100644 --- a/wpimath/src/test/native/cpp/geometry/Pose3dTest.cpp +++ b/wpimath/src/test/native/cpp/geometry/Pose3dTest.cpp @@ -4,10 +4,10 @@ #include +#include #include #include "frc/geometry/Pose3d.h" -#include "gtest/gtest.h" using namespace frc; diff --git a/wpimath/src/test/native/cpp/geometry/QuaternionTest.cpp b/wpimath/src/test/native/cpp/geometry/QuaternionTest.cpp index cf217a3aa3..bf9d24a4b6 100644 --- a/wpimath/src/test/native/cpp/geometry/QuaternionTest.cpp +++ b/wpimath/src/test/native/cpp/geometry/QuaternionTest.cpp @@ -4,8 +4,9 @@ #include +#include + #include "frc/geometry/Quaternion.h" -#include "gtest/gtest.h" #include "units/angle.h" #include "units/math.h" diff --git a/wpimath/src/test/native/cpp/geometry/Rotation2dTest.cpp b/wpimath/src/test/native/cpp/geometry/Rotation2dTest.cpp index 4e2e6835c2..de2fc1741e 100644 --- a/wpimath/src/test/native/cpp/geometry/Rotation2dTest.cpp +++ b/wpimath/src/test/native/cpp/geometry/Rotation2dTest.cpp @@ -5,8 +5,9 @@ #include #include +#include + #include "frc/geometry/Rotation2d.h" -#include "gtest/gtest.h" using namespace frc; diff --git a/wpimath/src/test/native/cpp/geometry/Rotation3dTest.cpp b/wpimath/src/test/native/cpp/geometry/Rotation3dTest.cpp index b18ffa7911..aa2ea1176f 100644 --- a/wpimath/src/test/native/cpp/geometry/Rotation3dTest.cpp +++ b/wpimath/src/test/native/cpp/geometry/Rotation3dTest.cpp @@ -5,11 +5,11 @@ #include #include +#include #include #include "frc/EigenCore.h" #include "frc/geometry/Rotation3d.h" -#include "gtest/gtest.h" using namespace frc; diff --git a/wpimath/src/test/native/cpp/geometry/Transform2dTest.cpp b/wpimath/src/test/native/cpp/geometry/Transform2dTest.cpp index 1b0934d6ca..49c9466201 100644 --- a/wpimath/src/test/native/cpp/geometry/Transform2dTest.cpp +++ b/wpimath/src/test/native/cpp/geometry/Transform2dTest.cpp @@ -4,11 +4,12 @@ #include +#include + #include "frc/geometry/Pose2d.h" #include "frc/geometry/Rotation2d.h" #include "frc/geometry/Transform2d.h" #include "frc/geometry/Translation2d.h" -#include "gtest/gtest.h" using namespace frc; diff --git a/wpimath/src/test/native/cpp/geometry/Transform3dTest.cpp b/wpimath/src/test/native/cpp/geometry/Transform3dTest.cpp index 904ec9c06e..8a6bbc039f 100644 --- a/wpimath/src/test/native/cpp/geometry/Transform3dTest.cpp +++ b/wpimath/src/test/native/cpp/geometry/Transform3dTest.cpp @@ -4,11 +4,12 @@ #include +#include + #include "frc/geometry/Pose3d.h" #include "frc/geometry/Rotation3d.h" #include "frc/geometry/Transform3d.h" #include "frc/geometry/Translation3d.h" -#include "gtest/gtest.h" using namespace frc; diff --git a/wpimath/src/test/native/cpp/geometry/Translation2dTest.cpp b/wpimath/src/test/native/cpp/geometry/Translation2dTest.cpp index 209e343c26..1c92c0a8b8 100644 --- a/wpimath/src/test/native/cpp/geometry/Translation2dTest.cpp +++ b/wpimath/src/test/native/cpp/geometry/Translation2dTest.cpp @@ -4,8 +4,9 @@ #include +#include + #include "frc/geometry/Translation2d.h" -#include "gtest/gtest.h" using namespace frc; diff --git a/wpimath/src/test/native/cpp/geometry/Translation3dTest.cpp b/wpimath/src/test/native/cpp/geometry/Translation3dTest.cpp index 58c611ed40..b7aa8ceeff 100644 --- a/wpimath/src/test/native/cpp/geometry/Translation3dTest.cpp +++ b/wpimath/src/test/native/cpp/geometry/Translation3dTest.cpp @@ -4,8 +4,9 @@ #include +#include + #include "frc/geometry/Translation3d.h" -#include "gtest/gtest.h" using namespace frc; diff --git a/wpimath/src/test/native/cpp/geometry/Twist2dTest.cpp b/wpimath/src/test/native/cpp/geometry/Twist2dTest.cpp index 33970cdeec..7f121c0b1e 100644 --- a/wpimath/src/test/native/cpp/geometry/Twist2dTest.cpp +++ b/wpimath/src/test/native/cpp/geometry/Twist2dTest.cpp @@ -5,8 +5,9 @@ #include #include +#include + #include "frc/geometry/Pose2d.h" -#include "gtest/gtest.h" using namespace frc; diff --git a/wpimath/src/test/native/cpp/geometry/Twist3dTest.cpp b/wpimath/src/test/native/cpp/geometry/Twist3dTest.cpp index 0d8a8f42a1..245ec17517 100644 --- a/wpimath/src/test/native/cpp/geometry/Twist3dTest.cpp +++ b/wpimath/src/test/native/cpp/geometry/Twist3dTest.cpp @@ -5,8 +5,9 @@ #include #include +#include + #include "frc/geometry/Pose3d.h" -#include "gtest/gtest.h" using namespace frc; diff --git a/wpimath/src/test/native/cpp/interpolation/TimeInterpolatableBufferTest.cpp b/wpimath/src/test/native/cpp/interpolation/TimeInterpolatableBufferTest.cpp index 8a920f6fba..e448db2c29 100644 --- a/wpimath/src/test/native/cpp/interpolation/TimeInterpolatableBufferTest.cpp +++ b/wpimath/src/test/native/cpp/interpolation/TimeInterpolatableBufferTest.cpp @@ -4,10 +4,11 @@ #include +#include + #include "frc/geometry/Pose2d.h" #include "frc/geometry/Rotation2d.h" #include "frc/interpolation/TimeInterpolatableBuffer.h" -#include "gtest/gtest.h" #include "units/time.h" TEST(TimeInterpolatableBufferTest, Interpolation) { diff --git a/wpimath/src/test/native/cpp/kinematics/ChassisSpeedsTest.cpp b/wpimath/src/test/native/cpp/kinematics/ChassisSpeedsTest.cpp index 42f1305d2a..ae1e0d0aa3 100644 --- a/wpimath/src/test/native/cpp/kinematics/ChassisSpeedsTest.cpp +++ b/wpimath/src/test/native/cpp/kinematics/ChassisSpeedsTest.cpp @@ -2,8 +2,9 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include + #include "frc/kinematics/ChassisSpeeds.h" -#include "gtest/gtest.h" static constexpr double kEpsilon = 1E-9; diff --git a/wpimath/src/test/native/cpp/kinematics/DifferentialDriveKinematicsTest.cpp b/wpimath/src/test/native/cpp/kinematics/DifferentialDriveKinematicsTest.cpp index 4af5ac8a49..782fed05db 100644 --- a/wpimath/src/test/native/cpp/kinematics/DifferentialDriveKinematicsTest.cpp +++ b/wpimath/src/test/native/cpp/kinematics/DifferentialDriveKinematicsTest.cpp @@ -4,9 +4,10 @@ #include +#include + #include "frc/kinematics/ChassisSpeeds.h" #include "frc/kinematics/DifferentialDriveKinematics.h" -#include "gtest/gtest.h" #include "units/angular_velocity.h" #include "units/length.h" #include "units/velocity.h" diff --git a/wpimath/src/test/native/cpp/kinematics/DifferentialDriveOdometryTest.cpp b/wpimath/src/test/native/cpp/kinematics/DifferentialDriveOdometryTest.cpp index e4809417fa..a228357f50 100644 --- a/wpimath/src/test/native/cpp/kinematics/DifferentialDriveOdometryTest.cpp +++ b/wpimath/src/test/native/cpp/kinematics/DifferentialDriveOdometryTest.cpp @@ -4,9 +4,10 @@ #include +#include + #include "frc/kinematics/DifferentialDriveKinematics.h" #include "frc/kinematics/DifferentialDriveOdometry.h" -#include "gtest/gtest.h" static constexpr double kEpsilon = 1E-9; diff --git a/wpimath/src/test/native/cpp/kinematics/MecanumDriveKinematicsTest.cpp b/wpimath/src/test/native/cpp/kinematics/MecanumDriveKinematicsTest.cpp index 364163ee61..04a3f1f2d8 100644 --- a/wpimath/src/test/native/cpp/kinematics/MecanumDriveKinematicsTest.cpp +++ b/wpimath/src/test/native/cpp/kinematics/MecanumDriveKinematicsTest.cpp @@ -4,9 +4,10 @@ #include +#include + #include "frc/geometry/Translation2d.h" #include "frc/kinematics/MecanumDriveKinematics.h" -#include "gtest/gtest.h" #include "units/angular_velocity.h" using namespace frc; diff --git a/wpimath/src/test/native/cpp/kinematics/MecanumDriveOdometryTest.cpp b/wpimath/src/test/native/cpp/kinematics/MecanumDriveOdometryTest.cpp index bfaf91b1de..be206553b4 100644 --- a/wpimath/src/test/native/cpp/kinematics/MecanumDriveOdometryTest.cpp +++ b/wpimath/src/test/native/cpp/kinematics/MecanumDriveOdometryTest.cpp @@ -5,9 +5,10 @@ #include #include +#include + #include "frc/kinematics/MecanumDriveOdometry.h" #include "frc/trajectory/TrajectoryGenerator.h" -#include "gtest/gtest.h" using namespace frc; diff --git a/wpimath/src/test/native/cpp/kinematics/SwerveDriveKinematicsTest.cpp b/wpimath/src/test/native/cpp/kinematics/SwerveDriveKinematicsTest.cpp index a8e41d6102..e7726e6d96 100644 --- a/wpimath/src/test/native/cpp/kinematics/SwerveDriveKinematicsTest.cpp +++ b/wpimath/src/test/native/cpp/kinematics/SwerveDriveKinematicsTest.cpp @@ -4,9 +4,10 @@ #include +#include + #include "frc/geometry/Translation2d.h" #include "frc/kinematics/SwerveDriveKinematics.h" -#include "gtest/gtest.h" #include "units/angular_velocity.h" using namespace frc; diff --git a/wpimath/src/test/native/cpp/kinematics/SwerveDriveOdometryTest.cpp b/wpimath/src/test/native/cpp/kinematics/SwerveDriveOdometryTest.cpp index 8c67ab53b3..265b0cc6c3 100644 --- a/wpimath/src/test/native/cpp/kinematics/SwerveDriveOdometryTest.cpp +++ b/wpimath/src/test/native/cpp/kinematics/SwerveDriveOdometryTest.cpp @@ -5,12 +5,13 @@ #include #include +#include + #include "frc/kinematics/SwerveDriveKinematics.h" #include "frc/kinematics/SwerveDriveOdometry.h" #include "frc/trajectory/Trajectory.h" #include "frc/trajectory/TrajectoryConfig.h" #include "frc/trajectory/TrajectoryGenerator.h" -#include "gtest/gtest.h" using namespace frc; diff --git a/wpimath/src/test/native/cpp/kinematics/SwerveModulePositionTest.cpp b/wpimath/src/test/native/cpp/kinematics/SwerveModulePositionTest.cpp index ae775b0ea1..14155f1d47 100644 --- a/wpimath/src/test/native/cpp/kinematics/SwerveModulePositionTest.cpp +++ b/wpimath/src/test/native/cpp/kinematics/SwerveModulePositionTest.cpp @@ -2,9 +2,10 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include + #include "frc/geometry/Rotation2d.h" #include "frc/kinematics/SwerveModulePosition.h" -#include "gtest/gtest.h" TEST(SwerveModulePositionTest, Equality) { frc::SwerveModulePosition position1{2_m, 90_deg}; diff --git a/wpimath/src/test/native/cpp/kinematics/SwerveModuleStateTest.cpp b/wpimath/src/test/native/cpp/kinematics/SwerveModuleStateTest.cpp index ae25d98b7e..efc39757d6 100644 --- a/wpimath/src/test/native/cpp/kinematics/SwerveModuleStateTest.cpp +++ b/wpimath/src/test/native/cpp/kinematics/SwerveModuleStateTest.cpp @@ -2,9 +2,10 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include + #include "frc/geometry/Rotation2d.h" #include "frc/kinematics/SwerveModuleState.h" -#include "gtest/gtest.h" static constexpr double kEpsilon = 1E-9; diff --git a/wpimath/src/test/native/cpp/main.cpp b/wpimath/src/test/native/cpp/main.cpp index 09072ee347..e993c1f14e 100644 --- a/wpimath/src/test/native/cpp/main.cpp +++ b/wpimath/src/test/native/cpp/main.cpp @@ -2,7 +2,7 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include "gtest/gtest.h" +#include int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); diff --git a/wpimath/src/test/native/cpp/spline/CubicHermiteSplineTest.cpp b/wpimath/src/test/native/cpp/spline/CubicHermiteSplineTest.cpp index 7422a7f457..c98d1908ec 100644 --- a/wpimath/src/test/native/cpp/spline/CubicHermiteSplineTest.cpp +++ b/wpimath/src/test/native/cpp/spline/CubicHermiteSplineTest.cpp @@ -5,12 +5,13 @@ #include #include +#include + #include "frc/geometry/Pose2d.h" #include "frc/geometry/Rotation2d.h" #include "frc/spline/QuinticHermiteSpline.h" #include "frc/spline/SplineHelper.h" #include "frc/spline/SplineParameterizer.h" -#include "gtest/gtest.h" #include "units/length.h" using namespace frc; diff --git a/wpimath/src/test/native/cpp/spline/QuinticHermiteSplineTest.cpp b/wpimath/src/test/native/cpp/spline/QuinticHermiteSplineTest.cpp index e45df7bc3b..a0df9bb687 100644 --- a/wpimath/src/test/native/cpp/spline/QuinticHermiteSplineTest.cpp +++ b/wpimath/src/test/native/cpp/spline/QuinticHermiteSplineTest.cpp @@ -4,12 +4,13 @@ #include +#include + #include "frc/geometry/Pose2d.h" #include "frc/geometry/Rotation2d.h" #include "frc/spline/QuinticHermiteSpline.h" #include "frc/spline/SplineHelper.h" #include "frc/spline/SplineParameterizer.h" -#include "gtest/gtest.h" #include "units/angle.h" #include "units/length.h" diff --git a/wpimath/src/test/native/cpp/system/DiscretizationTest.cpp b/wpimath/src/test/native/cpp/system/DiscretizationTest.cpp index 38ecb261f2..c42fcf0b9a 100644 --- a/wpimath/src/test/native/cpp/system/DiscretizationTest.cpp +++ b/wpimath/src/test/native/cpp/system/DiscretizationTest.cpp @@ -2,11 +2,11 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include - #include -#include "Eigen/Eigenvalues" +#include +#include + #include "frc/EigenCore.h" #include "frc/system/Discretization.h" #include "frc/system/NumericalIntegration.h" diff --git a/wpimath/src/test/native/cpp/system/LinearSystemIDTest.cpp b/wpimath/src/test/native/cpp/system/LinearSystemIDTest.cpp index dbc4284e10..4dc6263823 100644 --- a/wpimath/src/test/native/cpp/system/LinearSystemIDTest.cpp +++ b/wpimath/src/test/native/cpp/system/LinearSystemIDTest.cpp @@ -5,6 +5,7 @@ #include #include #include + #include #include "frc/system/plant/LinearSystemId.h" diff --git a/wpimath/src/test/native/cpp/system/NumericalIntegrationTest.cpp b/wpimath/src/test/native/cpp/system/NumericalIntegrationTest.cpp index 7c3d11621f..45acb77829 100644 --- a/wpimath/src/test/native/cpp/system/NumericalIntegrationTest.cpp +++ b/wpimath/src/test/native/cpp/system/NumericalIntegrationTest.cpp @@ -2,10 +2,10 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include - #include +#include + #include "frc/system/NumericalIntegration.h" // Tests that integrating dx/dt = e^x works. diff --git a/wpimath/src/test/native/cpp/system/RungeKuttaTimeVaryingTest.cpp b/wpimath/src/test/native/cpp/system/RungeKuttaTimeVaryingTest.cpp index 70f193892f..d88908c339 100644 --- a/wpimath/src/test/native/cpp/system/RungeKuttaTimeVaryingTest.cpp +++ b/wpimath/src/test/native/cpp/system/RungeKuttaTimeVaryingTest.cpp @@ -2,10 +2,10 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include - #include +#include + #include "frc/system/RungeKuttaTimeVarying.h" namespace { diff --git a/wpimath/src/test/native/cpp/trajectory/CentripetalAccelerationConstraintTest.cpp b/wpimath/src/test/native/cpp/trajectory/CentripetalAccelerationConstraintTest.cpp index e2f7112940..fafcbd4e74 100644 --- a/wpimath/src/test/native/cpp/trajectory/CentripetalAccelerationConstraintTest.cpp +++ b/wpimath/src/test/native/cpp/trajectory/CentripetalAccelerationConstraintTest.cpp @@ -5,9 +5,10 @@ #include #include +#include + #include "frc/trajectory/constraint/CentripetalAccelerationConstraint.h" #include "frc/trajectory/constraint/TrajectoryConstraint.h" -#include "gtest/gtest.h" #include "trajectory/TestTrajectory.h" #include "units/acceleration.h" #include "units/angle.h" diff --git a/wpimath/src/test/native/cpp/trajectory/DifferentialDriveKinematicsTest.cpp b/wpimath/src/test/native/cpp/trajectory/DifferentialDriveKinematicsTest.cpp index e3723b58cd..09abc76de1 100644 --- a/wpimath/src/test/native/cpp/trajectory/DifferentialDriveKinematicsTest.cpp +++ b/wpimath/src/test/native/cpp/trajectory/DifferentialDriveKinematicsTest.cpp @@ -5,9 +5,10 @@ #include #include +#include + #include "frc/kinematics/DifferentialDriveKinematics.h" #include "frc/trajectory/constraint/DifferentialDriveKinematicsConstraint.h" -#include "gtest/gtest.h" #include "trajectory/TestTrajectory.h" #include "units/time.h" diff --git a/wpimath/src/test/native/cpp/trajectory/DifferentialDriveVoltageTest.cpp b/wpimath/src/test/native/cpp/trajectory/DifferentialDriveVoltageTest.cpp index e3d6b7f336..5282638ad0 100644 --- a/wpimath/src/test/native/cpp/trajectory/DifferentialDriveVoltageTest.cpp +++ b/wpimath/src/test/native/cpp/trajectory/DifferentialDriveVoltageTest.cpp @@ -5,11 +5,12 @@ #include #include +#include + #include "frc/geometry/Pose2d.h" #include "frc/kinematics/DifferentialDriveKinematics.h" #include "frc/trajectory/TrajectoryGenerator.h" #include "frc/trajectory/constraint/DifferentialDriveVoltageConstraint.h" -#include "gtest/gtest.h" #include "trajectory/TestTrajectory.h" #include "units/acceleration.h" #include "units/length.h" diff --git a/wpimath/src/test/native/cpp/trajectory/EllipticalRegionConstraintTest.cpp b/wpimath/src/test/native/cpp/trajectory/EllipticalRegionConstraintTest.cpp index 8d9e2213c0..c39bb15aa0 100644 --- a/wpimath/src/test/native/cpp/trajectory/EllipticalRegionConstraintTest.cpp +++ b/wpimath/src/test/native/cpp/trajectory/EllipticalRegionConstraintTest.cpp @@ -4,10 +4,11 @@ #include +#include + #include "frc/kinematics/DifferentialDriveKinematics.h" #include "frc/trajectory/constraint/EllipticalRegionConstraint.h" #include "frc/trajectory/constraint/MaxVelocityConstraint.h" -#include "gtest/gtest.h" #include "trajectory/TestTrajectory.h" #include "units/acceleration.h" #include "units/angle.h" diff --git a/wpimath/src/test/native/cpp/trajectory/RectangularRegionConstraintTest.cpp b/wpimath/src/test/native/cpp/trajectory/RectangularRegionConstraintTest.cpp index 0bf6b1a733..8ec3a70a3f 100644 --- a/wpimath/src/test/native/cpp/trajectory/RectangularRegionConstraintTest.cpp +++ b/wpimath/src/test/native/cpp/trajectory/RectangularRegionConstraintTest.cpp @@ -4,10 +4,11 @@ #include +#include + #include "frc/kinematics/DifferentialDriveKinematics.h" #include "frc/trajectory/constraint/MaxVelocityConstraint.h" #include "frc/trajectory/constraint/RectangularRegionConstraint.h" -#include "gtest/gtest.h" #include "trajectory/TestTrajectory.h" #include "units/acceleration.h" #include "units/length.h" diff --git a/wpimath/src/test/native/cpp/trajectory/TrajectoryConcatenateTest.cpp b/wpimath/src/test/native/cpp/trajectory/TrajectoryConcatenateTest.cpp index 2b733a8642..2bfd5413a5 100644 --- a/wpimath/src/test/native/cpp/trajectory/TrajectoryConcatenateTest.cpp +++ b/wpimath/src/test/native/cpp/trajectory/TrajectoryConcatenateTest.cpp @@ -2,9 +2,10 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include + #include "frc/trajectory/TrajectoryConfig.h" #include "frc/trajectory/TrajectoryGenerator.h" -#include "gtest/gtest.h" TEST(TrajectoryConcatenateTest, States) { auto t1 = frc::TrajectoryGenerator::GenerateTrajectory( diff --git a/wpimath/src/test/native/cpp/trajectory/TrajectoryGeneratorTest.cpp b/wpimath/src/test/native/cpp/trajectory/TrajectoryGeneratorTest.cpp index 58924612e8..8b501606a5 100644 --- a/wpimath/src/test/native/cpp/trajectory/TrajectoryGeneratorTest.cpp +++ b/wpimath/src/test/native/cpp/trajectory/TrajectoryGeneratorTest.cpp @@ -4,11 +4,12 @@ #include +#include + #include "frc/trajectory/Trajectory.h" #include "frc/trajectory/TrajectoryGenerator.h" #include "frc/trajectory/constraint/CentripetalAccelerationConstraint.h" #include "frc/trajectory/constraint/TrajectoryConstraint.h" -#include "gtest/gtest.h" #include "trajectory/TestTrajectory.h" #include "units/math.h" diff --git a/wpimath/src/test/native/cpp/trajectory/TrajectoryJsonTest.cpp b/wpimath/src/test/native/cpp/trajectory/TrajectoryJsonTest.cpp index 90c6dc02ce..9411696002 100644 --- a/wpimath/src/test/native/cpp/trajectory/TrajectoryJsonTest.cpp +++ b/wpimath/src/test/native/cpp/trajectory/TrajectoryJsonTest.cpp @@ -2,9 +2,10 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include + #include "frc/trajectory/TrajectoryConfig.h" #include "frc/trajectory/TrajectoryUtil.h" -#include "gtest/gtest.h" #include "trajectory/TestTrajectory.h" using namespace frc; diff --git a/wpimath/src/test/native/cpp/trajectory/TrajectoryTransformTest.cpp b/wpimath/src/test/native/cpp/trajectory/TrajectoryTransformTest.cpp index 5c77a5b6df..f088fa34b6 100644 --- a/wpimath/src/test/native/cpp/trajectory/TrajectoryTransformTest.cpp +++ b/wpimath/src/test/native/cpp/trajectory/TrajectoryTransformTest.cpp @@ -4,10 +4,11 @@ #include +#include + #include "frc/trajectory/Trajectory.h" #include "frc/trajectory/TrajectoryConfig.h" #include "frc/trajectory/TrajectoryGenerator.h" -#include "gtest/gtest.h" void TestSameShapedTrajectory(std::vector statesA, std::vector statesB) { diff --git a/wpimath/src/test/native/cpp/trajectory/TrapezoidProfileTest.cpp b/wpimath/src/test/native/cpp/trajectory/TrapezoidProfileTest.cpp index b9a66969d9..b2e5b187e5 100644 --- a/wpimath/src/test/native/cpp/trajectory/TrapezoidProfileTest.cpp +++ b/wpimath/src/test/native/cpp/trajectory/TrapezoidProfileTest.cpp @@ -7,7 +7,8 @@ #include #include -#include "gtest/gtest.h" +#include + #include "units/acceleration.h" #include "units/length.h" #include "units/math.h" diff --git a/wpinet/.styleguide b/wpinet/.styleguide index ab557576b2..bfd5e75084 100644 --- a/wpinet/.styleguide +++ b/wpinet/.styleguide @@ -32,5 +32,6 @@ includeGuardRoots { includeOtherLibs { ^fmt/ + ^gtest/ ^wpi/ } diff --git a/wpinet/src/test/native/cpp/HttpParserTest.cpp b/wpinet/src/test/native/cpp/HttpParserTest.cpp index a9d927ad41..02a17d9a86 100644 --- a/wpinet/src/test/native/cpp/HttpParserTest.cpp +++ b/wpinet/src/test/native/cpp/HttpParserTest.cpp @@ -4,7 +4,7 @@ #include "wpinet/HttpParser.h" // NOLINT(build/include_order) -#include "gtest/gtest.h" +#include namespace wpi { diff --git a/wpinet/src/test/native/cpp/HttpUtilTest.cpp b/wpinet/src/test/native/cpp/HttpUtilTest.cpp index 4417b7c1de..f36235b75a 100644 --- a/wpinet/src/test/native/cpp/HttpUtilTest.cpp +++ b/wpinet/src/test/native/cpp/HttpUtilTest.cpp @@ -4,7 +4,7 @@ #include "wpinet/HttpUtil.h" // NOLINT(build/include_order) -#include "gtest/gtest.h" +#include namespace wpi { diff --git a/wpinet/src/test/native/cpp/MulticastTest.cpp b/wpinet/src/test/native/cpp/MulticastTest.cpp index bbec538029..412dd4841b 100644 --- a/wpinet/src/test/native/cpp/MulticastTest.cpp +++ b/wpinet/src/test/native/cpp/MulticastTest.cpp @@ -12,10 +12,9 @@ #include #include +#include #include -#include "gtest/gtest.h" - TEST(MulticastServiceAnnouncerTest, EmptyText) { const std::string_view serviceName = "TestServiceNoText"; const std::string_view serviceType = "_wpinotxt"; diff --git a/wpinet/src/test/native/cpp/WebSocketTest.h b/wpinet/src/test/native/cpp/WebSocketTest.h index 9e3ab05fc7..1c904a8b84 100644 --- a/wpinet/src/test/native/cpp/WebSocketTest.h +++ b/wpinet/src/test/native/cpp/WebSocketTest.h @@ -9,7 +9,8 @@ #include #include -#include "gtest/gtest.h" +#include + #include "wpinet/uv/Loop.h" #include "wpinet/uv/Pipe.h" #include "wpinet/uv/Timer.h" diff --git a/wpinet/src/test/native/cpp/WorkerThreadTest.cpp b/wpinet/src/test/native/cpp/WorkerThreadTest.cpp index 8279cb17bb..d4f462d890 100644 --- a/wpinet/src/test/native/cpp/WorkerThreadTest.cpp +++ b/wpinet/src/test/native/cpp/WorkerThreadTest.cpp @@ -4,10 +4,9 @@ #include "wpinet/WorkerThread.h" // NOLINT(build/include_order) -#include "gtest/gtest.h" // NOLINT(build/include_order) - #include +#include #include #include diff --git a/wpinet/src/test/native/cpp/hostname.cpp b/wpinet/src/test/native/cpp/hostname.cpp index 51a29a23ae..df7e2f0486 100644 --- a/wpinet/src/test/native/cpp/hostname.cpp +++ b/wpinet/src/test/native/cpp/hostname.cpp @@ -4,11 +4,10 @@ #include "wpinet/hostname.h" +#include #include #include -#include "gtest/gtest.h" - namespace wpi { TEST(HostNameTest, HostNameNotEmpty) { ASSERT_NE(GetHostname(), ""); diff --git a/wpinet/src/test/native/cpp/main.cpp b/wpinet/src/test/native/cpp/main.cpp index 09072ee347..e993c1f14e 100644 --- a/wpinet/src/test/native/cpp/main.cpp +++ b/wpinet/src/test/native/cpp/main.cpp @@ -2,7 +2,7 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include "gtest/gtest.h" +#include int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); diff --git a/wpinet/src/test/native/cpp/raw_uv_stream_test.cpp b/wpinet/src/test/native/cpp/raw_uv_stream_test.cpp index 541da5a5d0..4b33b17381 100644 --- a/wpinet/src/test/native/cpp/raw_uv_stream_test.cpp +++ b/wpinet/src/test/native/cpp/raw_uv_stream_test.cpp @@ -4,7 +4,7 @@ #include "wpinet/raw_uv_ostream.h" // NOLINT(build/include_order) -#include "gtest/gtest.h" +#include namespace wpi { diff --git a/wpinet/src/test/native/cpp/uv/UvAsyncFunctionTest.cpp b/wpinet/src/test/native/cpp/uv/UvAsyncFunctionTest.cpp index 19c1faf2e4..4369dc0fc0 100644 --- a/wpinet/src/test/native/cpp/uv/UvAsyncFunctionTest.cpp +++ b/wpinet/src/test/native/cpp/uv/UvAsyncFunctionTest.cpp @@ -4,10 +4,10 @@ #include "wpinet/uv/AsyncFunction.h" // NOLINT(build/include_order) -#include "gtest/gtest.h" // NOLINT(build/include_order) - #include +#include + #include "wpinet/uv/Loop.h" #include "wpinet/uv/Prepare.h" diff --git a/wpinet/src/test/native/cpp/uv/UvAsyncTest.cpp b/wpinet/src/test/native/cpp/uv/UvAsyncTest.cpp index 5dd0f7689c..ed4324c0f1 100644 --- a/wpinet/src/test/native/cpp/uv/UvAsyncTest.cpp +++ b/wpinet/src/test/native/cpp/uv/UvAsyncTest.cpp @@ -25,11 +25,10 @@ #include "wpinet/uv/Async.h" // NOLINT(build/include_order) -#include "gtest/gtest.h" // NOLINT(build/include_order) - #include #include +#include #include #include "wpinet/uv/Loop.h" diff --git a/wpinet/src/test/native/cpp/uv/UvBufferTest.cpp b/wpinet/src/test/native/cpp/uv/UvBufferTest.cpp index da6a63cacf..f349d51337 100644 --- a/wpinet/src/test/native/cpp/uv/UvBufferTest.cpp +++ b/wpinet/src/test/native/cpp/uv/UvBufferTest.cpp @@ -4,7 +4,7 @@ #include "wpinet/uv/Buffer.h" // NOLINT(build/include_order) -#include "gtest/gtest.h" // NOLINT(build/include_order) +#include namespace wpi::uv { diff --git a/wpinet/src/test/native/cpp/uv/UvGetAddrInfoTest.cpp b/wpinet/src/test/native/cpp/uv/UvGetAddrInfoTest.cpp index 5ad33b23d8..78bb4c29c8 100644 --- a/wpinet/src/test/native/cpp/uv/UvGetAddrInfoTest.cpp +++ b/wpinet/src/test/native/cpp/uv/UvGetAddrInfoTest.cpp @@ -25,7 +25,7 @@ #include "wpinet/uv/GetAddrInfo.h" // NOLINT(build/include_order) -#include "gtest/gtest.h" // NOLINT(build/include_order) +#include #include "wpinet/uv/Loop.h" diff --git a/wpinet/src/test/native/cpp/uv/UvGetNameInfoTest.cpp b/wpinet/src/test/native/cpp/uv/UvGetNameInfoTest.cpp index 707f03730a..dfb813b7d7 100644 --- a/wpinet/src/test/native/cpp/uv/UvGetNameInfoTest.cpp +++ b/wpinet/src/test/native/cpp/uv/UvGetNameInfoTest.cpp @@ -25,7 +25,7 @@ #include "wpinet/uv/GetNameInfo.h" // NOLINT(build/include_order) -#include "gtest/gtest.h" // NOLINT(build/include_order) +#include #include "wpinet/uv/Loop.h" diff --git a/wpinet/src/test/native/cpp/uv/UvLoopWalkTest.cpp b/wpinet/src/test/native/cpp/uv/UvLoopWalkTest.cpp index eee0f99514..3cb1c9fc69 100644 --- a/wpinet/src/test/native/cpp/uv/UvLoopWalkTest.cpp +++ b/wpinet/src/test/native/cpp/uv/UvLoopWalkTest.cpp @@ -25,7 +25,7 @@ #include "wpinet/uv/Loop.h" // NOLINT(build/include_order) -#include "gtest/gtest.h" // NOLINT(build/include_order) +#include #include "wpinet/uv/Timer.h" diff --git a/wpinet/src/test/native/cpp/uv/UvTimerTest.cpp b/wpinet/src/test/native/cpp/uv/UvTimerTest.cpp index 7377ab151d..ea6188bf26 100644 --- a/wpinet/src/test/native/cpp/uv/UvTimerTest.cpp +++ b/wpinet/src/test/native/cpp/uv/UvTimerTest.cpp @@ -4,7 +4,7 @@ #include "wpinet/uv/Timer.h" // NOLINT(build/include_order) -#include "gtest/gtest.h" +#include namespace wpi::uv { diff --git a/wpiutil/.styleguide b/wpiutil/.styleguide index 9c1196ebef..9a2f4376f6 100644 --- a/wpiutil/.styleguide +++ b/wpiutil/.styleguide @@ -39,6 +39,11 @@ repoRootNameOverride { wpiutil } +includeOtherLibs { + ^fmt/ + ^gtest/ +} + includeGuardRoots { wpiutil/src/main/native/cpp/ wpiutil/src/main/native/include/ diff --git a/wpiutil/examples/printlog/printlog.cpp b/wpiutil/examples/printlog/printlog.cpp index 073a24759c..cb89934524 100644 --- a/wpiutil/examples/printlog/printlog.cpp +++ b/wpiutil/examples/printlog/printlog.cpp @@ -4,8 +4,9 @@ #include -#include "fmt/chrono.h" -#include "fmt/format.h" +#include +#include + #include "wpi/DataLogReader.h" #include "wpi/DenseMap.h" #include "wpi/MemoryBuffer.h" diff --git a/wpiutil/examples/writelog/writelog.cpp b/wpiutil/examples/writelog/writelog.cpp index 6fdf7634ac..bd5e14f441 100644 --- a/wpiutil/examples/writelog/writelog.cpp +++ b/wpiutil/examples/writelog/writelog.cpp @@ -8,7 +8,8 @@ #include #include -#include "fmt/format.h" +#include + #include "wpi/DataLog.h" int main(int argc, char** argv) { diff --git a/wpiutil/src/dev/native/cpp/main.cpp b/wpiutil/src/dev/native/cpp/main.cpp index 14ddda296c..fb2a4b0bf7 100644 --- a/wpiutil/src/dev/native/cpp/main.cpp +++ b/wpiutil/src/dev/native/cpp/main.cpp @@ -2,7 +2,8 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include "fmt/core.h" +#include + #include "wpi/SmallString.h" int main() { diff --git a/wpiutil/src/main/native/cpp/DataLog.cpp b/wpiutil/src/main/native/cpp/DataLog.cpp index acb0fd9b9c..19a718f27d 100644 --- a/wpiutil/src/main/native/cpp/DataLog.cpp +++ b/wpiutil/src/main/native/cpp/DataLog.cpp @@ -26,7 +26,8 @@ #include #include -#include "fmt/format.h" +#include + #include "wpi/Endian.h" #include "wpi/Logger.h" #include "wpi/MathExtras.h" diff --git a/wpiutil/src/main/native/cpp/jni/DataLogJNI.cpp b/wpiutil/src/main/native/cpp/jni/DataLogJNI.cpp index a68f08ce99..50d790f785 100644 --- a/wpiutil/src/main/native/cpp/jni/DataLogJNI.cpp +++ b/wpiutil/src/main/native/cpp/jni/DataLogJNI.cpp @@ -4,9 +4,10 @@ #include +#include + #include "WPIUtilJNI.h" #include "edu_wpi_first_util_datalog_DataLogJNI.h" -#include "fmt/format.h" #include "wpi/DataLog.h" #include "wpi/jni_util.h" diff --git a/wpiutil/src/main/native/cpp/jni/WPIUtilJNI.cpp b/wpiutil/src/main/native/cpp/jni/WPIUtilJNI.cpp index 77f06b5332..0befdda508 100644 --- a/wpiutil/src/main/native/cpp/jni/WPIUtilJNI.cpp +++ b/wpiutil/src/main/native/cpp/jni/WPIUtilJNI.cpp @@ -6,8 +6,9 @@ #include +#include + #include "edu_wpi_first_util_WPIUtilJNI.h" -#include "fmt/format.h" #include "wpi/Synchronization.h" #include "wpi/jni_util.h" #include "wpi/timestamp.h" diff --git a/wpiutil/src/main/native/cpp/sendable/SendableRegistry.cpp b/wpiutil/src/main/native/cpp/sendable/SendableRegistry.cpp index 2c591e9fcd..7a1e0b0b10 100644 --- a/wpiutil/src/main/native/cpp/sendable/SendableRegistry.cpp +++ b/wpiutil/src/main/native/cpp/sendable/SendableRegistry.cpp @@ -6,7 +6,8 @@ #include -#include "fmt/format.h" +#include + #include "wpi/DenseMap.h" #include "wpi/SmallVector.h" #include "wpi/UidVector.h" diff --git a/wpiutil/src/main/native/cpp/timestamp.cpp b/wpiutil/src/main/native/cpp/timestamp.cpp index 1bfc1fc324..d2de941507 100644 --- a/wpiutil/src/main/native/cpp/timestamp.cpp +++ b/wpiutil/src/main/native/cpp/timestamp.cpp @@ -36,7 +36,7 @@ using namespace nRoboRIO_FPGANamespace; #include -#include "fmt/format.h" +#include #ifdef __FRC_ROBORIO__ namespace { diff --git a/wpiutil/src/main/native/include/wpi/Logger.h b/wpiutil/src/main/native/include/wpi/Logger.h index b2c9aa9e5c..01a02fd6a6 100644 --- a/wpiutil/src/main/native/include/wpi/Logger.h +++ b/wpiutil/src/main/native/include/wpi/Logger.h @@ -8,7 +8,7 @@ #include #include -#include "fmt/format.h" +#include namespace wpi { diff --git a/wpiutil/src/main/native/include/wpi/fmt/raw_ostream.h b/wpiutil/src/main/native/include/wpi/fmt/raw_ostream.h index 024e04c05b..617785969e 100644 --- a/wpiutil/src/main/native/include/wpi/fmt/raw_ostream.h +++ b/wpiutil/src/main/native/include/wpi/fmt/raw_ostream.h @@ -5,7 +5,8 @@ #ifndef WPIUTIL_WPI_FMT_RAW_OSTREAM_H_ #define WPIUTIL_WPI_FMT_RAW_OSTREAM_H_ -#include "fmt/format.h" +#include + #include "wpi/raw_ostream.h" FMT_BEGIN_NAMESPACE diff --git a/wpiutil/src/test/native/cpp/ArrayTest.cpp b/wpiutil/src/test/native/cpp/ArrayTest.cpp index 1f2815727a..f70b201f42 100644 --- a/wpiutil/src/test/native/cpp/ArrayTest.cpp +++ b/wpiutil/src/test/native/cpp/ArrayTest.cpp @@ -2,7 +2,8 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include "gtest/gtest.h" +#include + #include "wpi/array.h" namespace { diff --git a/wpiutil/src/test/native/cpp/Base64Test.cpp b/wpiutil/src/test/native/cpp/Base64Test.cpp index 542858d41d..514bb55bf5 100644 --- a/wpiutil/src/test/native/cpp/Base64Test.cpp +++ b/wpiutil/src/test/native/cpp/Base64Test.cpp @@ -2,7 +2,8 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include "gtest/gtest.h" +#include + #include "wpi/Base64.h" #include "wpi/SmallString.h" diff --git a/wpiutil/src/test/native/cpp/CircularBufferTest.cpp b/wpiutil/src/test/native/cpp/CircularBufferTest.cpp index ad2285ea23..a56e2e5557 100644 --- a/wpiutil/src/test/native/cpp/CircularBufferTest.cpp +++ b/wpiutil/src/test/native/cpp/CircularBufferTest.cpp @@ -6,7 +6,7 @@ #include -#include "gtest/gtest.h" +#include static const std::array values = { {751.848, 766.366, 342.657, 234.252, 716.126, 132.344, 445.697, 22.727, diff --git a/wpiutil/src/test/native/cpp/ScopeExitTest.cpp b/wpiutil/src/test/native/cpp/ScopeExitTest.cpp index e131694d11..d6f99cabba 100644 --- a/wpiutil/src/test/native/cpp/ScopeExitTest.cpp +++ b/wpiutil/src/test/native/cpp/ScopeExitTest.cpp @@ -2,7 +2,8 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include "gtest/gtest.h" +#include + #include "wpi/scope" TEST(ScopeExitTest, ScopeExit) { diff --git a/wpiutil/src/test/native/cpp/StaticCircularBufferTest.cpp b/wpiutil/src/test/native/cpp/StaticCircularBufferTest.cpp index f95f9cbb7c..338bd8e239 100644 --- a/wpiutil/src/test/native/cpp/StaticCircularBufferTest.cpp +++ b/wpiutil/src/test/native/cpp/StaticCircularBufferTest.cpp @@ -6,7 +6,7 @@ #include -#include "gtest/gtest.h" +#include static const std::array values = { {751.848, 766.366, 342.657, 234.252, 716.126, 132.344, 445.697, 22.727, diff --git a/wpiutil/src/test/native/cpp/SynchronizationTest.cpp b/wpiutil/src/test/native/cpp/SynchronizationTest.cpp index a349c549e8..70d6d132e0 100644 --- a/wpiutil/src/test/native/cpp/SynchronizationTest.cpp +++ b/wpiutil/src/test/native/cpp/SynchronizationTest.cpp @@ -6,7 +6,7 @@ #include -#include "gtest/gtest.h" +#include TEST(EventTest, AutoReset) { auto event = wpi::CreateEvent(false, false); diff --git a/wpiutil/src/test/native/cpp/UidVectorTest.cpp b/wpiutil/src/test/native/cpp/UidVectorTest.cpp index f9e1624e9a..dda7d79c3f 100644 --- a/wpiutil/src/test/native/cpp/UidVectorTest.cpp +++ b/wpiutil/src/test/native/cpp/UidVectorTest.cpp @@ -4,7 +4,7 @@ #include "wpi/UidVector.h" // NOLINT(build/include_order) -#include "gtest/gtest.h" +#include namespace wpi { diff --git a/wpiutil/src/test/native/cpp/UnescapeCStringTest.cpp b/wpiutil/src/test/native/cpp/UnescapeCStringTest.cpp index 7f0ca5fcf8..8b35b9746b 100644 --- a/wpiutil/src/test/native/cpp/UnescapeCStringTest.cpp +++ b/wpiutil/src/test/native/cpp/UnescapeCStringTest.cpp @@ -2,7 +2,8 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include "gtest/gtest.h" +#include + #include "wpi/SmallString.h" #include "wpi/StringExtras.h" diff --git a/wpiutil/src/test/native/cpp/ct_string_test.cpp b/wpiutil/src/test/native/cpp/ct_string_test.cpp index df957478a1..6c3c7d0ef7 100644 --- a/wpiutil/src/test/native/cpp/ct_string_test.cpp +++ b/wpiutil/src/test/native/cpp/ct_string_test.cpp @@ -7,7 +7,7 @@ #include #include -#include "gtest/gtest.h" // NOLINT(build/include_order) +#include TEST(CtStringTest, Concat) { using namespace wpi::literals; diff --git a/wpiutil/src/test/native/cpp/future_test.cpp b/wpiutil/src/test/native/cpp/future_test.cpp index 8817f2dd01..97e5e608cd 100644 --- a/wpiutil/src/test/native/cpp/future_test.cpp +++ b/wpiutil/src/test/native/cpp/future_test.cpp @@ -4,10 +4,10 @@ #include "wpi/future.h" // NOLINT(build/include_order) -#include "gtest/gtest.h" // NOLINT(build/include_order) - #include +#include + namespace wpi { TEST(FutureTest, Then) { diff --git a/wpiutil/src/test/native/cpp/json/unit-algorithms.cpp b/wpiutil/src/test/native/cpp/json/unit-algorithms.cpp index f1a87453a9..083210aea6 100644 --- a/wpiutil/src/test/native/cpp/json/unit-algorithms.cpp +++ b/wpiutil/src/test/native/cpp/json/unit-algorithms.cpp @@ -32,13 +32,14 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "gtest/gtest.h" - #include "unit-json.h" -using wpi::json; #include +#include + +using wpi::json; + class JsonAlgorithmsTest : public ::testing::Test { protected: json j_array = {13, 29, 3, {{"one", 1}, {"two", 2}}, true, false, {1, 2, 3}, "foo", "baz"}; diff --git a/wpiutil/src/test/native/cpp/json/unit-capacity.cpp b/wpiutil/src/test/native/cpp/json/unit-capacity.cpp index 8f5433ec42..2e22c6d053 100644 --- a/wpiutil/src/test/native/cpp/json/unit-capacity.cpp +++ b/wpiutil/src/test/native/cpp/json/unit-capacity.cpp @@ -32,9 +32,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "gtest/gtest.h" - #include "unit-json.h" + +#include + using wpi::json; TEST(JsonEmptyTest, Boolean) diff --git a/wpiutil/src/test/native/cpp/json/unit-cbor.cpp b/wpiutil/src/test/native/cpp/json/unit-cbor.cpp index dfb3b60539..f96ff522ac 100644 --- a/wpiutil/src/test/native/cpp/json/unit-cbor.cpp +++ b/wpiutil/src/test/native/cpp/json/unit-cbor.cpp @@ -32,16 +32,15 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "gtest/gtest.h" - #include "unit-json.h" #include +#include + +#include using wpi::json; -#include - TEST(CborDiscardedTest, Case) { // discarded values are not serialized diff --git a/wpiutil/src/test/native/cpp/json/unit-comparison.cpp b/wpiutil/src/test/native/cpp/json/unit-comparison.cpp index 18934a20aa..be1c90215a 100644 --- a/wpiutil/src/test/native/cpp/json/unit-comparison.cpp +++ b/wpiutil/src/test/native/cpp/json/unit-comparison.cpp @@ -32,9 +32,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "gtest/gtest.h" - #include "unit-json.h" + +#include + using wpi::json; class JsonComparisonTypesTest : public ::testing::Test { diff --git a/wpiutil/src/test/native/cpp/json/unit-concepts.cpp b/wpiutil/src/test/native/cpp/json/unit-concepts.cpp index 4ce5a5b910..6b9438a6e3 100644 --- a/wpiutil/src/test/native/cpp/json/unit-concepts.cpp +++ b/wpiutil/src/test/native/cpp/json/unit-concepts.cpp @@ -32,9 +32,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "gtest/gtest.h" - #include "unit-json.h" + +#include + using wpi::json; TEST(JsonConceptsTest, ContainerRequirements) diff --git a/wpiutil/src/test/native/cpp/json/unit-constructor1.cpp b/wpiutil/src/test/native/cpp/json/unit-constructor1.cpp index 273bfb6203..61b9831a8f 100644 --- a/wpiutil/src/test/native/cpp/json/unit-constructor1.cpp +++ b/wpiutil/src/test/native/cpp/json/unit-constructor1.cpp @@ -32,7 +32,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "gtest/gtest.h" +#include "unit-json.h" #include #include @@ -44,7 +44,8 @@ SOFTWARE. #include #include -#include "unit-json.h" +#include + using wpi::json; using wpi::JsonTest; diff --git a/wpiutil/src/test/native/cpp/json/unit-constructor2.cpp b/wpiutil/src/test/native/cpp/json/unit-constructor2.cpp index 39f1301546..d7045fe3ae 100644 --- a/wpiutil/src/test/native/cpp/json/unit-constructor2.cpp +++ b/wpiutil/src/test/native/cpp/json/unit-constructor2.cpp @@ -32,9 +32,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "gtest/gtest.h" - #include "unit-json.h" + +#include + using wpi::json; TEST(JsonCopyConstructorTest, Object) diff --git a/wpiutil/src/test/native/cpp/json/unit-conversions.cpp b/wpiutil/src/test/native/cpp/json/unit-conversions.cpp index 601055c59e..e824316946 100644 --- a/wpiutil/src/test/native/cpp/json/unit-conversions.cpp +++ b/wpiutil/src/test/native/cpp/json/unit-conversions.cpp @@ -32,11 +32,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "gtest/gtest.h" - #include "unit-json.h" -using wpi::json; -using wpi::JsonTest; #include #include @@ -46,6 +42,11 @@ using wpi::JsonTest; #include #include +#include + +using wpi::json; +using wpi::JsonTest; + template class JsonGetObjectTest : public ::testing::Test { public: diff --git a/wpiutil/src/test/native/cpp/json/unit-deserialization.cpp b/wpiutil/src/test/native/cpp/json/unit-deserialization.cpp index 2505ef50ec..306f6a7f78 100644 --- a/wpiutil/src/test/native/cpp/json/unit-deserialization.cpp +++ b/wpiutil/src/test/native/cpp/json/unit-deserialization.cpp @@ -32,14 +32,16 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "gtest/gtest.h" - #include "unit-json.h" -#include "wpi/raw_istream.h" -using wpi::json; #include +#include + +#include "wpi/raw_istream.h" + +using wpi::json; + TEST(JsonDeserializationTest, SuccessfulStream) { std::string s = "[\"foo\",1,2,3,false,{\"one\":1}]"; diff --git a/wpiutil/src/test/native/cpp/json/unit-element_access1.cpp b/wpiutil/src/test/native/cpp/json/unit-element_access1.cpp index a97d6b66be..54bfcc6e25 100644 --- a/wpiutil/src/test/native/cpp/json/unit-element_access1.cpp +++ b/wpiutil/src/test/native/cpp/json/unit-element_access1.cpp @@ -32,9 +32,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "gtest/gtest.h" - #include "unit-json.h" + +#include + using wpi::json; class JsonElementArrayAccessTestBase { diff --git a/wpiutil/src/test/native/cpp/json/unit-element_access2.cpp b/wpiutil/src/test/native/cpp/json/unit-element_access2.cpp index ab953bd228..495e855e10 100644 --- a/wpiutil/src/test/native/cpp/json/unit-element_access2.cpp +++ b/wpiutil/src/test/native/cpp/json/unit-element_access2.cpp @@ -32,12 +32,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "gtest/gtest.h" - #include "unit-json.h" #include +#include + using wpi::json; class JsonElementObjectAccessTestBase { diff --git a/wpiutil/src/test/native/cpp/json/unit-inspection.cpp b/wpiutil/src/test/native/cpp/json/unit-inspection.cpp index 79c63f0cca..4a59268760 100644 --- a/wpiutil/src/test/native/cpp/json/unit-inspection.cpp +++ b/wpiutil/src/test/native/cpp/json/unit-inspection.cpp @@ -32,9 +32,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "gtest/gtest.h" - #include "unit-json.h" + +#include + using wpi::json; TEST(JsonConvTypeCheckTest, Object) diff --git a/wpiutil/src/test/native/cpp/json/unit-iterators1.cpp b/wpiutil/src/test/native/cpp/json/unit-iterators1.cpp index bae38623e7..dda884fa56 100644 --- a/wpiutil/src/test/native/cpp/json/unit-iterators1.cpp +++ b/wpiutil/src/test/native/cpp/json/unit-iterators1.cpp @@ -32,9 +32,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "gtest/gtest.h" - #include "unit-json.h" + +#include + using wpi::json; using wpi::JsonTest; diff --git a/wpiutil/src/test/native/cpp/json/unit-iterators2.cpp b/wpiutil/src/test/native/cpp/json/unit-iterators2.cpp index 69a4dac571..12b1a33d23 100644 --- a/wpiutil/src/test/native/cpp/json/unit-iterators2.cpp +++ b/wpiutil/src/test/native/cpp/json/unit-iterators2.cpp @@ -32,9 +32,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "gtest/gtest.h" - #include "unit-json.h" + +#include + using wpi::json; TEST(JsonIteratorTest, Comparisons) diff --git a/wpiutil/src/test/native/cpp/json/unit-json_pointer.cpp b/wpiutil/src/test/native/cpp/json/unit-json_pointer.cpp index d54fd6afe7..a847e321c3 100644 --- a/wpiutil/src/test/native/cpp/json/unit-json_pointer.cpp +++ b/wpiutil/src/test/native/cpp/json/unit-json_pointer.cpp @@ -32,9 +32,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "gtest/gtest.h" - #include "unit-json.h" + +#include + using wpi::json; using wpi::JsonTest; diff --git a/wpiutil/src/test/native/cpp/json/unit-meta.cpp b/wpiutil/src/test/native/cpp/json/unit-meta.cpp index 45daf8f8ce..86d9ba77c4 100644 --- a/wpiutil/src/test/native/cpp/json/unit-meta.cpp +++ b/wpiutil/src/test/native/cpp/json/unit-meta.cpp @@ -32,9 +32,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "gtest/gtest.h" - #include "unit-json.h" + +#include + using wpi::json; TEST(JsonVersionTest, Meta) diff --git a/wpiutil/src/test/native/cpp/json/unit-modifiers.cpp b/wpiutil/src/test/native/cpp/json/unit-modifiers.cpp index 4125858d4e..563ce2445f 100644 --- a/wpiutil/src/test/native/cpp/json/unit-modifiers.cpp +++ b/wpiutil/src/test/native/cpp/json/unit-modifiers.cpp @@ -32,9 +32,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "gtest/gtest.h" - #include "unit-json.h" + +#include + using wpi::json; TEST(JsonClearTest, Boolean) diff --git a/wpiutil/src/test/native/cpp/json/unit-msgpack.cpp b/wpiutil/src/test/native/cpp/json/unit-msgpack.cpp index 73665ea0a3..71419e2cd3 100644 --- a/wpiutil/src/test/native/cpp/json/unit-msgpack.cpp +++ b/wpiutil/src/test/native/cpp/json/unit-msgpack.cpp @@ -32,14 +32,15 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "gtest/gtest.h" - #include "unit-json.h" -using wpi::json; #include #include +#include + +using wpi::json; + TEST(MessagePackDiscardedTest, Case) { // discarded values are not serialized diff --git a/wpiutil/src/test/native/cpp/json/unit-pointer_access.cpp b/wpiutil/src/test/native/cpp/json/unit-pointer_access.cpp index 3224b053b0..8d10d55580 100644 --- a/wpiutil/src/test/native/cpp/json/unit-pointer_access.cpp +++ b/wpiutil/src/test/native/cpp/json/unit-pointer_access.cpp @@ -32,12 +32,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "gtest/gtest.h" - #include "unit-json.h" #include +#include + using wpi::json; TEST(JsonPointerTest, TypesCreate) diff --git a/wpiutil/src/test/native/cpp/json/unit-readme.cpp b/wpiutil/src/test/native/cpp/json/unit-readme.cpp index d9bb9e5160..b6475d6ab6 100644 --- a/wpiutil/src/test/native/cpp/json/unit-readme.cpp +++ b/wpiutil/src/test/native/cpp/json/unit-readme.cpp @@ -32,10 +32,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "gtest/gtest.h" - #include "unit-json.h" -using wpi::json; #include #include @@ -45,8 +42,12 @@ using wpi::json; #include #include +#include + #include "wpi/raw_ostream.h" +using wpi::json; + TEST(JsonReadmeTest, Basic) { // create an empty structure (null) diff --git a/wpiutil/src/test/native/cpp/json/unit-reference_access.cpp b/wpiutil/src/test/native/cpp/json/unit-reference_access.cpp index 7c3cfb1379..38d6416e79 100644 --- a/wpiutil/src/test/native/cpp/json/unit-reference_access.cpp +++ b/wpiutil/src/test/native/cpp/json/unit-reference_access.cpp @@ -32,9 +32,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "gtest/gtest.h" - #include "unit-json.h" + +#include + using wpi::json; // reference access to object_t diff --git a/wpiutil/src/test/native/cpp/json/unit-unicode.cpp b/wpiutil/src/test/native/cpp/json/unit-unicode.cpp index e9dc71861e..6651a84907 100644 --- a/wpiutil/src/test/native/cpp/json/unit-unicode.cpp +++ b/wpiutil/src/test/native/cpp/json/unit-unicode.cpp @@ -32,16 +32,17 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "gtest/gtest.h" - #include "unit-json.h" -using wpi::json; -#include "fmt/format.h" +#include + +#include +#include + #include "wpi/StringExtras.h" #include "wpi/raw_ostream.h" -#include +using wpi::json; // create and check a JSON string with up to four UTF-8 bytes ::testing::AssertionResult check_utf8string(bool success_expected, int byte1, int byte2 = -1, int byte3 = -1, int byte4 = -1) diff --git a/wpiutil/src/test/native/cpp/leb128Test.cpp b/wpiutil/src/test/native/cpp/leb128Test.cpp index cc537ae300..6c78b51e45 100644 --- a/wpiutil/src/test/native/cpp/leb128Test.cpp +++ b/wpiutil/src/test/native/cpp/leb128Test.cpp @@ -16,7 +16,8 @@ #include #include -#include "gtest/gtest.h" +#include + #include "wpi/SmallString.h" #include "wpi/leb128.h" #include "wpi/raw_istream.h" diff --git a/wpiutil/src/test/native/cpp/main.cpp b/wpiutil/src/test/native/cpp/main.cpp index 09072ee347..e993c1f14e 100644 --- a/wpiutil/src/test/native/cpp/main.cpp +++ b/wpiutil/src/test/native/cpp/main.cpp @@ -2,7 +2,7 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. -#include "gtest/gtest.h" +#include int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); diff --git a/wpiutil/src/test/native/cpp/priority_mutex_test.cpp b/wpiutil/src/test/native/cpp/priority_mutex_test.cpp index 4eef68be4a..8e2ec3eafe 100644 --- a/wpiutil/src/test/native/cpp/priority_mutex_test.cpp +++ b/wpiutil/src/test/native/cpp/priority_mutex_test.cpp @@ -8,7 +8,7 @@ #include #include -#include "gtest/gtest.h" +#include namespace wpi { diff --git a/wpiutil/src/test/native/cpp/sha1Test.cpp b/wpiutil/src/test/native/cpp/sha1Test.cpp index 02574313cc..814e47edc4 100644 --- a/wpiutil/src/test/native/cpp/sha1Test.cpp +++ b/wpiutil/src/test/native/cpp/sha1Test.cpp @@ -21,7 +21,8 @@ #include -#include "gtest/gtest.h" +#include + #include "wpi/sha1.h" namespace wpi { diff --git a/wpiutil/src/test/native/cpp/sigslot/function-traits.cpp b/wpiutil/src/test/native/cpp/sigslot/function-traits.cpp index f31e2967c6..9901488876 100644 --- a/wpiutil/src/test/native/cpp/sigslot/function-traits.cpp +++ b/wpiutil/src/test/native/cpp/sigslot/function-traits.cpp @@ -33,10 +33,10 @@ SOFTWARE. #include "wpi/Signal.h" // NOLINT(build/include_order) -#include "gtest/gtest.h" // NOLINT(build/include_order) - #include +#include + using namespace wpi::sig::trait; namespace { diff --git a/wpiutil/src/test/native/cpp/sigslot/recursive.cpp b/wpiutil/src/test/native/cpp/sigslot/recursive.cpp index 82613f2d9c..6d35f78faf 100644 --- a/wpiutil/src/test/native/cpp/sigslot/recursive.cpp +++ b/wpiutil/src/test/native/cpp/sigslot/recursive.cpp @@ -33,7 +33,7 @@ SOFTWARE. #include "wpi/Signal.h" // NOLINT(build/include_order) -#include "gtest/gtest.h" +#include namespace { diff --git a/wpiutil/src/test/native/cpp/sigslot/signal-extended.cpp b/wpiutil/src/test/native/cpp/sigslot/signal-extended.cpp index a0dbdfc1d8..e863ca6d2d 100644 --- a/wpiutil/src/test/native/cpp/sigslot/signal-extended.cpp +++ b/wpiutil/src/test/native/cpp/sigslot/signal-extended.cpp @@ -33,7 +33,7 @@ SOFTWARE. #include "wpi/Signal.h" // NOLINT(build/include_order) -#include "gtest/gtest.h" +#include using namespace wpi::sig; diff --git a/wpiutil/src/test/native/cpp/sigslot/signal-threaded.cpp b/wpiutil/src/test/native/cpp/sigslot/signal-threaded.cpp index 00001a86f2..15dc3a89d8 100644 --- a/wpiutil/src/test/native/cpp/sigslot/signal-threaded.cpp +++ b/wpiutil/src/test/native/cpp/sigslot/signal-threaded.cpp @@ -33,12 +33,12 @@ SOFTWARE. #include "wpi/Signal.h" // NOLINT(build/include_order) -#include "gtest/gtest.h" // NOLINT(build/include_order) - #include #include #include +#include + using namespace wpi::sig; namespace { diff --git a/wpiutil/src/test/native/cpp/sigslot/signal-tracking.cpp b/wpiutil/src/test/native/cpp/sigslot/signal-tracking.cpp index d05ee1a726..b77f5a4749 100644 --- a/wpiutil/src/test/native/cpp/sigslot/signal-tracking.cpp +++ b/wpiutil/src/test/native/cpp/sigslot/signal-tracking.cpp @@ -33,12 +33,12 @@ SOFTWARE. #include "wpi/Signal.h" // NOLINT(build/include_order) -#include "gtest/gtest.h" // NOLINT(build/include_order) - #include #include #include +#include + using namespace wpi::sig; namespace { diff --git a/wpiutil/src/test/native/cpp/sigslot/signal.cpp b/wpiutil/src/test/native/cpp/sigslot/signal.cpp index cc2ff80ea7..34d149e762 100644 --- a/wpiutil/src/test/native/cpp/sigslot/signal.cpp +++ b/wpiutil/src/test/native/cpp/sigslot/signal.cpp @@ -33,12 +33,12 @@ SOFTWARE. #include "wpi/Signal.h" // NOLINT(build/include_order) -#include "gtest/gtest.h" // NOLINT(build/include_order) - #include #include #include +#include + using namespace wpi::sig; namespace { diff --git a/wpiutil/src/test/native/cpp/spinlock_bench.cpp b/wpiutil/src/test/native/cpp/spinlock_bench.cpp index 73883d817a..c8af3d26ee 100644 --- a/wpiutil/src/test/native/cpp/spinlock_bench.cpp +++ b/wpiutil/src/test/native/cpp/spinlock_bench.cpp @@ -8,8 +8,9 @@ #include #include -#include "fmt/core.h" -#include "gtest/gtest.h" +#include +#include + #include "wpi/mutex.h" static std::mutex std_mutex;