fprime/Svc/FprimeRouter/test/ut/FprimeRouterTestMain.cpp
Thomas Boyer-Chammard c3b2e04880
Use data return pattern on Uplink and standardize port names (#3546)
* First pass at Svc + TcpClient implementation

* Revert FileUplink changes

* Add copy (with allocation/deallocation) to FprimeRouter to simplify buffer management

* Update FprimeRouter UTs

* Update FprimeDeframer UTs

* Update FrameAccumulator UTs

* Update ComStub UTs

* Update missing Drv and UTs

* Update ComInterface to use ComDataWithContext on output

* Update Ref/RPI topology

* Fix spelling

* Fix test typo

* Update Udp component and UTs

* Rename data ports and standardize "Return" naming pattern

* Fix variable name

* Adapt UTs

* Update Communication Adapter Interface docs

* Full SDD updates

* Spelling &  nits and details

* Put formatting back to original

* Update Deframer interface to include bufferReturn

* Address review comments
2025-05-08 10:54:54 -07:00

46 lines
1.4 KiB
C++

// ======================================================================
// \title FprimeRouterTestMain.cpp
// \author thomas-bc
// \brief cpp file for FprimeRouter component test main function
// ======================================================================
#include "FprimeRouterTester.hpp"
#include <Fw/Test/UnitTest.hpp>
TEST(FprimeRouter, TestComInterface) {
COMMENT("Route a com packet");
Svc::FprimeRouterTester tester;
tester.testRouteComInterface();
}
TEST(FprimeRouter, TestFileInterface) {
COMMENT("Route a file packet");
Svc::FprimeRouterTester tester;
tester.testRouteFileInterface();
}
TEST(FprimeRouter, TestUnknownInterface) {
COMMENT("Route a packet of unknown type");
Svc::FprimeRouterTester tester;
tester.testRouteUnknownPacket();
}
TEST(FprimeRouter, TestRouteUnknownPacketUnconnected) {
COMMENT("Attempt to route a packet of unknown type with no port connected");
Svc::FprimeRouterTester tester(true);
tester.testRouteUnknownPacketUnconnected();
}
TEST(FprimeRouter, TestBufferReturn) {
COMMENT("Deallocate a returning buffer");
Svc::FprimeRouterTester tester;
tester.testBufferReturn();
}
TEST(FprimeRouter, TestCommandResponse) {
COMMENT("Handle a command response (no-op)");
Svc::FprimeRouterTester tester;
tester.testCommandResponse();
}
int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}