mirror of
https://github.com/nasa/fprime.git
synced 2025-12-11 13:04:17 -06:00
* Refactor FrameAccumulator not to assert on incorrect size_out * spelling * revert port names * Update check logic
60 lines
1.7 KiB
C++
60 lines
1.7 KiB
C++
// ======================================================================
|
|
// \title FrameAccumulatorTestMain.cpp
|
|
// \author thomas-bc
|
|
// \brief cpp file for FrameAccumulator component test main function
|
|
// ======================================================================
|
|
|
|
#include "FrameAccumulatorTester.hpp"
|
|
#include "STest/Random/Random.hpp"
|
|
|
|
TEST(FrameAccumulator, TestFrameDetected) {
|
|
Svc::FrameAccumulatorTester tester;
|
|
tester.testFrameDetected();
|
|
}
|
|
|
|
TEST(FrameAccumulator, TestMoreDataNeeded) {
|
|
Svc::FrameAccumulatorTester tester;
|
|
tester.testMoreDataNeeded();
|
|
}
|
|
|
|
TEST(FrameAccumulator, TestNoFrameDetected) {
|
|
Svc::FrameAccumulatorTester tester;
|
|
tester.testNoFrameDetected();
|
|
}
|
|
|
|
TEST(FrameAccumulator, TestReceiveZeroSizeBuffer) {
|
|
Svc::FrameAccumulatorTester tester;
|
|
tester.testReceiveZeroSizeBuffer();
|
|
}
|
|
|
|
TEST(FrameAccumulator, TestAccumulateTwoBuffers) {
|
|
Svc::FrameAccumulatorTester tester;
|
|
tester.testAccumulateTwoBuffers();
|
|
}
|
|
|
|
TEST(FrameAccumulator, testAccumulateBuffersEmitFrame) {
|
|
Svc::FrameAccumulatorTester tester;
|
|
tester.testAccumulateBuffersEmitFrame();
|
|
}
|
|
|
|
TEST(FrameAccumulator, testAccumulateBuffersEmitManyFrames) {
|
|
Svc::FrameAccumulatorTester tester;
|
|
tester.testAccumulateBuffersEmitManyFrames();
|
|
}
|
|
|
|
TEST(FrameAccumulator, testBufferReturnDeallocation) {
|
|
Svc::FrameAccumulatorTester tester;
|
|
tester.testBufferReturnDeallocation();
|
|
}
|
|
|
|
TEST(FrameAccumulator, testDetectionErrorHandling) {
|
|
Svc::FrameAccumulatorTester tester;
|
|
tester.testDetectionErrorHandling();
|
|
}
|
|
|
|
int main(int argc, char** argv) {
|
|
STest::Random::seed();
|
|
::testing::InitGoogleTest(&argc, argv);
|
|
return RUN_ALL_TESTS();
|
|
}
|