Skip to content

Commit

Permalink
Add PNP and Multitag packet tests
Browse files Browse the repository at this point in the history
  • Loading branch information
srimanachanta committed Nov 19, 2023
1 parent eca609c commit 1e95d37
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions photon-targeting/src/test/native/cpp/PacketTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,33 @@

#include "gtest/gtest.h"
#include "photon/dataflow/structures/Packet.h"
#include "photon/targeting/MultiTargetPNPResult.h"
#include "photon/targeting/PNPResult.h"
#include "photon/targeting/PhotonPipelineResult.h"
#include "photon/targeting/PhotonTrackedTarget.h"

TEST(PacketTest, PNPResult) {
photon::PNPResult result;
photon::Packet p;
p << result;

photon::PNPResult b;
p >> b;

EXPECT_EQ(result, b);
}

TEST(PacketTest, MultiTargetPNPResult) {
photon::MultiTargetPNPResult result;
photon::Packet p;
p << result;

photon::MultiTargetPNPResult b;
p >> b;

EXPECT_EQ(result, b);
}

TEST(PacketTest, PhotonTrackedTarget) {
photon::PhotonTrackedTarget target{
3.0,
Expand Down

0 comments on commit 1e95d37

Please sign in to comment.