mirror of
https://github.com/nasa/fprime.git
synced 2025-12-10 17:47:10 -06:00
65 lines
1.8 KiB
C++
65 lines
1.8 KiB
C++
// ======================================================================
|
|
// \title Util/test/ut/RateLimiterTester.hpp
|
|
// \author vwong
|
|
// \brief hpp file for RateLimiter test harness implementation class
|
|
//
|
|
// \copyright
|
|
//
|
|
// Copyright (C) 2009-2020 California Institute of Technology.
|
|
//
|
|
// ALL RIGHTS RESERVED. United States Government Sponsorship
|
|
// acknowledged.
|
|
// ======================================================================
|
|
|
|
#ifndef RATELIMITERTESTER_HPP
|
|
#define RATELIMITERTESTER_HPP
|
|
|
|
#include <Fw/FPrimeBasicTypes.hpp>
|
|
#include <STest/Pick/Pick.hpp>
|
|
#include "Utils/RateLimiter.hpp"
|
|
#include "gtest/gtest.h"
|
|
|
|
namespace Utils {
|
|
|
|
class RateLimiterTester {
|
|
// ----------------------------------------------------------------------
|
|
// Construction and destruction
|
|
// ----------------------------------------------------------------------
|
|
|
|
public:
|
|
//! Construct object RateLimiterTester
|
|
//!
|
|
RateLimiterTester();
|
|
|
|
//! Destroy object RateLimiterTester
|
|
//!
|
|
~RateLimiterTester();
|
|
|
|
public:
|
|
// ----------------------------------------------------------------------
|
|
// Tests
|
|
// ----------------------------------------------------------------------
|
|
|
|
void testCounterTriggering();
|
|
void testTimeTriggering();
|
|
void testCounterAndTimeTriggering();
|
|
|
|
private:
|
|
// ----------------------------------------------------------------------
|
|
// Helper methods
|
|
// ----------------------------------------------------------------------
|
|
|
|
//! Initialize components
|
|
//!
|
|
void initComponents();
|
|
|
|
private:
|
|
// ----------------------------------------------------------------------
|
|
// Variables
|
|
// ----------------------------------------------------------------------
|
|
};
|
|
|
|
} // end namespace Utils
|
|
|
|
#endif
|