fpp/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedNoArgsPortsOnlyGTestBase.ref.hpp

103 lines
3.8 KiB
C++
Vendored

// ======================================================================
// \title QueuedNoArgsPortsOnlyGTestBase.hpp
// \author Generated by fpp-to-cpp
// \brief hpp file for QueuedNoArgsPortsOnly component Google Test harness base class
// ======================================================================
#ifndef QueuedNoArgsPortsOnlyGTestBase_HPP
#define QueuedNoArgsPortsOnlyGTestBase_HPP
#include "gtest/gtest.h"
#include "test-base/QueuedNoArgsPortsOnlyTesterBase.hpp"
// ----------------------------------------------------------------------
// Macros for typed user from port history assertions
// ----------------------------------------------------------------------
#define ASSERT_FROM_PORT_HISTORY_SIZE(size) \
this->assertFromPortHistory_size(__FILE__, __LINE__, size)
#define ASSERT_from_noArgsOut_SIZE(size) \
this->assert_from_noArgsOut_size(__FILE__, __LINE__, size)
#define ASSERT_from_noArgsOut(index) \
{ \
ASSERT_GT(this->fromPortHistory_noArgsOut->size(), static_cast<U32>(index)) \
<< "\n" \
<< __FILE__ << ":" << __LINE__ << "\n" \
<< " Value: Index into history of noArgsOut\n" \
<< " Expected: Less than size of history (" \
<< this->fromPortHistory_noArgsOut->size() << ")\n" \
<< " Actual: " << index << "\n"; \
const FromPortEntry_noArgsOut& _e = \
this->fromPortHistory_noArgsOut->at(index); \
}
#define ASSERT_from_noArgsReturnOut_SIZE(size) \
this->assert_from_noArgsReturnOut_size(__FILE__, __LINE__, size)
#define ASSERT_from_noArgsReturnOut(index) \
{ \
ASSERT_GT(this->fromPortHistory_noArgsReturnOut->size(), static_cast<U32>(index)) \
<< "\n" \
<< __FILE__ << ":" << __LINE__ << "\n" \
<< " Value: Index into history of noArgsReturnOut\n" \
<< " Expected: Less than size of history (" \
<< this->fromPortHistory_noArgsReturnOut->size() << ")\n" \
<< " Actual: " << index << "\n"; \
const FromPortEntry_noArgsReturnOut& _e = \
this->fromPortHistory_noArgsReturnOut->at(index); \
}
//! \class QueuedNoArgsPortsOnlyGTestBase
//! \brief Auto-generated base for QueuedNoArgsPortsOnly component Google Test harness
class QueuedNoArgsPortsOnlyGTestBase :
public QueuedNoArgsPortsOnlyTesterBase
{
protected:
// ----------------------------------------------------------------------
// Construction and destruction
// ----------------------------------------------------------------------
//! Construct object QueuedNoArgsPortsOnlyGTestBase
QueuedNoArgsPortsOnlyGTestBase(
const char* const compName, //!< The component name
const U32 maxHistorySize //!< The maximum size of each history
);
//! Destroy object QueuedNoArgsPortsOnlyGTestBase
~QueuedNoArgsPortsOnlyGTestBase();
protected:
// ----------------------------------------------------------------------
// From ports
// ----------------------------------------------------------------------
//! From ports
void assertFromPortHistory_size(
const char* const __callSiteFileName, //!< The name of the file containing the call site
const U32 __callSiteLineNumber, //!< The line number of the call site
const U32 size //!< The asserted size
) const;
//! From port: noArgsOut
void assert_from_noArgsOut_size(
const char* const __callSiteFileName, //!< The name of the file containing the call site
const U32 __callSiteLineNumber, //!< The line number of the call site
const U32 size //!< The asserted size
) const;
//! From port: noArgsReturnOut
void assert_from_noArgsReturnOut_size(
const char* const __callSiteFileName, //!< The name of the file containing the call site
const U32 __callSiteLineNumber, //!< The line number of the call site
const U32 size //!< The asserted size
) const;
};
#endif