Run clang-format on the entire repo
This patch clang-formats the entire repo. Third-party code is
excluded.
I needed to fix up the .clang-format file so that all the header
includes are ordered properly. I could have sworn that it used to work
without the extra modification, but I guess not.
Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: I64bb9f2c795401393f9dfe2fefc4f04cb36b52f6
diff --git a/frc971/shooter_interpolation/interpolation_test.cc b/frc971/shooter_interpolation/interpolation_test.cc
index fd99124..92a2b76 100644
--- a/frc971/shooter_interpolation/interpolation_test.cc
+++ b/frc971/shooter_interpolation/interpolation_test.cc
@@ -1,3 +1,5 @@
+#include "frc971/shooter_interpolation/interpolation.h"
+
#include <unistd.h>
#include <memory>
@@ -6,19 +8,16 @@
#include "gtest/gtest.h"
-#include "frc971/shooter_interpolation/interpolation.h"
-
namespace frc971 {
namespace shooter_interpolation {
struct TestShotParams {
double angle;
double power;
- static TestShotParams BlendY(double x, const TestShotParams& a, const TestShotParams& b) {
- return TestShotParams{
- Blend(x, a.angle, b.angle),
- Blend(x, a.power, b.power)
- };
+ static TestShotParams BlendY(double x, const TestShotParams &a,
+ const TestShotParams &b) {
+ return TestShotParams{Blend(x, a.angle, b.angle),
+ Blend(x, a.power, b.power)};
}
};
@@ -32,7 +31,10 @@
// correctly
TEST(InterpolationTable, ExactNumbers) {
::std::vector<::std::pair<double, TestShotParams>> data = {
- {1, {10, 10}}, {3, {20, 20}}, {2, {15, 12345678}}, {4, {10, 567.323}},
+ {1, {10, 10}},
+ {3, {20, 20}},
+ {2, {15, 12345678}},
+ {4, {10, 567.323}},
};
TestInterpolationTable interpolation(data);
@@ -44,7 +46,10 @@
// correctly
TEST(InterpolationTable, InexactNumbers) {
::std::vector<::std::pair<double, TestShotParams>> data = {
- {1, {10, 10}}, {3, {20, 20}}, {2, {15, 15}}, {4, {10, 567.323}},
+ {1, {10, 10}},
+ {3, {20, 20}},
+ {2, {15, 15}},
+ {4, {10, 567.323}},
};
TestInterpolationTable interpolation(data);
@@ -56,7 +61,10 @@
// processed correctly
TEST(InterpolationTable, OutOfScopeNumbers) {
::std::vector<::std::pair<double, TestShotParams>> data = {
- {1, {10, 10}}, {3, {20, 20}}, {2, {15, 12345678}}, {4, {10, 567.323}},
+ {1, {10, 10}},
+ {3, {20, 20}},
+ {2, {15, 12345678}},
+ {4, {10, 567.323}},
};
TestInterpolationTable interpolation(data);