mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
Upgrade wpiformat and use clang-format's include sorting (#8350)
This PR also uses the newly added -default-branch flag to generate the list of changed files with respect to the correct branch (2027).
This commit is contained in:
@@ -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 "wpi/math/kinematics/ChassisSpeeds.hpp"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "wpi/math/kinematics/ChassisSpeeds.hpp"
|
||||
|
||||
static constexpr double kEpsilon = 1E-9;
|
||||
|
||||
TEST(ChassisSpeedsTest, Discretize) {
|
||||
|
||||
@@ -2,12 +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 "wpi/math/kinematics/DifferentialDriveKinematics.hpp"
|
||||
|
||||
#include <numbers>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "wpi/math/kinematics/ChassisSpeeds.hpp"
|
||||
#include "wpi/math/kinematics/DifferentialDriveKinematics.hpp"
|
||||
#include "wpi/units/angular_velocity.hpp"
|
||||
#include "wpi/units/length.hpp"
|
||||
#include "wpi/units/velocity.hpp"
|
||||
|
||||
@@ -2,12 +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 "wpi/math/kinematics/DifferentialDriveOdometry3d.hpp"
|
||||
|
||||
#include <numbers>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "wpi/math/kinematics/DifferentialDriveKinematics.hpp"
|
||||
#include "wpi/math/kinematics/DifferentialDriveOdometry3d.hpp"
|
||||
|
||||
static constexpr double kEpsilon = 1E-9;
|
||||
|
||||
|
||||
@@ -2,12 +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 "wpi/math/kinematics/DifferentialDriveOdometry.hpp"
|
||||
|
||||
#include <numbers>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "wpi/math/kinematics/DifferentialDriveKinematics.hpp"
|
||||
#include "wpi/math/kinematics/DifferentialDriveOdometry.hpp"
|
||||
|
||||
static constexpr double kEpsilon = 1E-9;
|
||||
|
||||
|
||||
@@ -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 <gtest/gtest.h>
|
||||
|
||||
#include "wpi/math/kinematics/DifferentialDriveWheelSpeeds.hpp"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
TEST(DifferentialDriveWheelSpeedsTest, Plus) {
|
||||
const wpi::math::DifferentialDriveWheelSpeeds left{1.0_mps, 0.5_mps};
|
||||
const wpi::math::DifferentialDriveWheelSpeeds right{2.0_mps, 1.5_mps};
|
||||
|
||||
@@ -2,12 +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 "wpi/math/kinematics/MecanumDriveKinematics.hpp"
|
||||
|
||||
#include <numbers>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "wpi/math/geometry/Translation2d.hpp"
|
||||
#include "wpi/math/kinematics/MecanumDriveKinematics.hpp"
|
||||
#include "wpi/units/angular_velocity.hpp"
|
||||
|
||||
using namespace wpi::math;
|
||||
|
||||
@@ -2,12 +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 "wpi/math/kinematics/MecanumDriveOdometry3d.hpp"
|
||||
|
||||
#include <limits>
|
||||
#include <random>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "wpi/math/kinematics/MecanumDriveOdometry3d.hpp"
|
||||
#include "wpi/math/trajectory/TrajectoryGenerator.hpp"
|
||||
|
||||
using namespace wpi::math;
|
||||
|
||||
@@ -2,12 +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 "wpi/math/kinematics/MecanumDriveOdometry.hpp"
|
||||
|
||||
#include <limits>
|
||||
#include <random>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "wpi/math/kinematics/MecanumDriveOdometry.hpp"
|
||||
#include "wpi/math/trajectory/TrajectoryGenerator.hpp"
|
||||
|
||||
using namespace wpi::math;
|
||||
|
||||
@@ -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 <gtest/gtest.h>
|
||||
|
||||
#include "wpi/math/kinematics/MecanumDriveWheelSpeeds.hpp"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
TEST(MecanumDriveWheelSpeedsTest, Plus) {
|
||||
const wpi::math::MecanumDriveWheelSpeeds left{1.0_mps, 0.5_mps, 2.0_mps,
|
||||
1.5_mps};
|
||||
|
||||
@@ -2,12 +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 "wpi/math/kinematics/SwerveDriveKinematics.hpp"
|
||||
|
||||
#include <numbers>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "wpi/math/geometry/Translation2d.hpp"
|
||||
#include "wpi/math/kinematics/SwerveDriveKinematics.hpp"
|
||||
#include "wpi/units/angular_velocity.hpp"
|
||||
|
||||
using namespace wpi::math;
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
// 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 "wpi/math/kinematics/SwerveDriveOdometry3d.hpp"
|
||||
|
||||
#include <limits>
|
||||
#include <random>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "wpi/math/kinematics/SwerveDriveKinematics.hpp"
|
||||
#include "wpi/math/kinematics/SwerveDriveOdometry3d.hpp"
|
||||
#include "wpi/math/trajectory/Trajectory.hpp"
|
||||
#include "wpi/math/trajectory/TrajectoryConfig.hpp"
|
||||
#include "wpi/math/trajectory/TrajectoryGenerator.hpp"
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
// 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 "wpi/math/kinematics/SwerveDriveOdometry.hpp"
|
||||
|
||||
#include <limits>
|
||||
#include <random>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "wpi/math/kinematics/SwerveDriveKinematics.hpp"
|
||||
#include "wpi/math/kinematics/SwerveDriveOdometry.hpp"
|
||||
#include "wpi/math/trajectory/Trajectory.hpp"
|
||||
#include "wpi/math/trajectory/TrajectoryConfig.hpp"
|
||||
#include "wpi/math/trajectory/TrajectoryGenerator.hpp"
|
||||
|
||||
@@ -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 "wpi/math/kinematics/SwerveModulePosition.hpp"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "wpi/math/geometry/Rotation2d.hpp"
|
||||
#include "wpi/math/kinematics/SwerveModulePosition.hpp"
|
||||
|
||||
TEST(SwerveModulePositionTest, Equality) {
|
||||
wpi::math::SwerveModulePosition position1{2_m, 90_deg};
|
||||
|
||||
@@ -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 "wpi/math/kinematics/SwerveModuleState.hpp"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "wpi/math/geometry/Rotation2d.hpp"
|
||||
#include "wpi/math/kinematics/SwerveModuleState.hpp"
|
||||
|
||||
static constexpr double kEpsilon = 1E-9;
|
||||
|
||||
|
||||
@@ -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 "wpi/math/kinematics/proto/SwerveDriveKinematicsProto.hpp"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "../../ProtoTestBase.hpp"
|
||||
#include "wpi/math/kinematics/SwerveDriveKinematics.hpp"
|
||||
#include "wpi/math/kinematics/proto/SwerveDriveKinematicsProto.hpp"
|
||||
|
||||
using namespace wpi::math;
|
||||
|
||||
|
||||
@@ -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 "wpi/math/kinematics/struct/SwerveDriveKinematicsStruct.hpp"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "../../StructTestBase.hpp"
|
||||
#include "wpi/math/kinematics/SwerveDriveKinematics.hpp"
|
||||
#include "wpi/math/kinematics/struct/SwerveDriveKinematicsStruct.hpp"
|
||||
|
||||
using namespace wpi::math;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user