Skip to content

Commit

Permalink
Formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
srimanachanta committed Nov 18, 2023
1 parent 76e42a6 commit b7b0477
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 42 deletions.
41 changes: 19 additions & 22 deletions photon-targeting/src/test/native/cpp/PacketTest.cpp
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
/*
* MIT License
* Copyright (C) Photon Vision.
*
* Copyright (c) PhotonVision
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#include <iostream>
Expand Down Expand Up @@ -84,8 +77,10 @@ TEST(PacketTest, PhotonPipelineResult) {
frc::Transform3d(frc::Translation3d(1_m, 2_m, 3_m),
frc::Rotation3d(1_rad, 2_rad, 3_rad)),
-1,
{photon::TargetCorner(1,2), photon::TargetCorner(3,4), photon::TargetCorner(5,6), photon::TargetCorner(7,8)},
{photon::TargetCorner(1,2), photon::TargetCorner(3,4), photon::TargetCorner(5,6), photon::TargetCorner(7,8)}},
{photon::TargetCorner(1, 2), photon::TargetCorner(3, 4),
photon::TargetCorner(5, 6), photon::TargetCorner(7, 8)},
{photon::TargetCorner(1, 2), photon::TargetCorner(3, 4),
photon::TargetCorner(5, 6), photon::TargetCorner(7, 8)}},
photon::PhotonTrackedTarget{
3.0,
-4.0,
Expand All @@ -97,8 +92,10 @@ TEST(PacketTest, PhotonPipelineResult) {
frc::Transform3d(frc::Translation3d(1_m, 2_m, 3_m),
frc::Rotation3d(1_rad, 2_rad, 3_rad)),
-1,
{photon::TargetCorner(1,2), photon::TargetCorner(3,4), photon::TargetCorner(5,6), photon::TargetCorner(7,8)},
{photon::TargetCorner(1,2), photon::TargetCorner(3,4), photon::TargetCorner(5,6), photon::TargetCorner(7,8)}}};
{photon::TargetCorner(1, 2), photon::TargetCorner(3, 4),
photon::TargetCorner(5, 6), photon::TargetCorner(7, 8)},
{photon::TargetCorner(1, 2), photon::TargetCorner(3, 4),
photon::TargetCorner(5, 6), photon::TargetCorner(7, 8)}}};

photon::PhotonPipelineResult result2{2_s, targets};
photon::Packet p2;
Expand Down
33 changes: 13 additions & 20 deletions photon-targeting/src/test/native/cpp/main.cpp
Original file line number Diff line number Diff line change
@@ -1,30 +1,23 @@
/*
* MIT License
* Copyright (C) Photon Vision.
*
* Copyright (c) PhotonVision
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#include "gtest/gtest.h"

int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}

0 comments on commit b7b0477

Please sign in to comment.