2#include "../../../../tests/catch2/catch.hpp"
3#include "../generated/logCodes.hpp"
4#include "../types/software_log.hpp"
5#include "../types/generated/software_log_generated.h"
6#include "../types/flatbuffer_log.hpp"
48 CSoftwareLog_0(
char * file_, uint32_t line_, int32_t errnoCode_, int32_t otherCode_,
char * explanation_) {
60 void* buffPtr = sl.builder.GetBufferPointer();
65 m_file = (
char *) malloc(fileStrLen);
96 flatlogs::logHeader::createLog<MagAOX::logger::software_notice>(logBuffer
106 GIVEN(
"a software_log log code")
108 WHEN(
"random values for fields")
158 CSoftwareLog_1(
char * file_, uint32_t line_, int32_t errnoCode_, int32_t otherCode_, std::string explanation_) {
170 void* buffPtr = sl.builder.GetBufferPointer();
175 m_file = (
char *) malloc(fileStrLen);
204 flatlogs::logHeader::createLog<MagAOX::logger::software_notice>(logBuffer
214 GIVEN(
"a software_log log code")
216 WHEN(
"random values for fields")
270 void* buffPtr = sl.builder.GetBufferPointer();
275 m_file = (
char *) malloc(fileStrLen);
302 flatlogs::logHeader::createLog<MagAOX::logger::software_notice>(logBuffer
312 GIVEN(
"a software_log log code")
314 WHEN(
"random values for fields")
359 CSoftwareLog_3(
char * file_, uint32_t line_, int32_t errnoCode_,
char * explanation_) {
370 void* buffPtr = sl.builder.GetBufferPointer();
375 m_file = (
char *) malloc(fileStrLen);
405 flatlogs::logHeader::createLog<MagAOX::logger::software_notice>(logBuffer
415 GIVEN(
"a software_log log code")
417 WHEN(
"random values for fields")
463 CSoftwareLog_4(
char * file_, uint32_t line_, int32_t errnoCode_, std::string explanation_) {
474 void* buffPtr = sl.builder.GetBufferPointer();
479 m_file = (
char *) malloc(fileStrLen);
507 flatlogs::logHeader::createLog<MagAOX::logger::software_notice>(logBuffer
517 GIVEN(
"a software_log log code")
519 WHEN(
"random values for fields")
572 void* buffPtr = sl.builder.GetBufferPointer();
577 m_file = (
char *) malloc(fileStrLen);
604 flatlogs::logHeader::createLog<MagAOX::logger::software_notice>(logBuffer
614 GIVEN(
"a software_log log code")
616 WHEN(
"random values for fields")
664 void* buffPtr = sl.builder.GetBufferPointer();
669 m_file = (
char *) malloc(fileStrLen);
695 flatlogs::logHeader::createLog<MagAOX::logger::software_notice>(logBuffer
705 GIVEN(
"a software_log log code")
707 WHEN(
"random values for fields")
int32_t m_saveSlOtherCode
CSoftwareLog_0(char *file_, uint32_t line_, int32_t errnoCode_, int32_t otherCode_, char *explanation_)
bool verify(const typename MagAOX::logger::software_log::messageT &msg)
char * m_saveSlExplanation
int32_t m_saveSlErrnoCode
int32_t m_saveSlErrnoCode
std::string m_explanation
std::string m_saveSlExplanation
int32_t m_saveSlOtherCode
bool verify(const typename MagAOX::logger::software_log::messageT &msg)
CSoftwareLog_1(char *file_, uint32_t line_, int32_t errnoCode_, int32_t otherCode_, std::string explanation_)
CSoftwareLog_2(char *file_, uint32_t line_, int32_t errnoCode_)
int32_t m_saveSlErrnoCode
bool verify(const typename MagAOX::logger::software_log::messageT &msg)
bool verify(const typename MagAOX::logger::software_log::messageT &msg)
int32_t m_saveSlErrnoCode
char * m_saveSlExplanation
CSoftwareLog_3(char *file_, uint32_t line_, int32_t errnoCode_, char *explanation_)
int32_t m_saveSlErrnoCode
CSoftwareLog_4(char *file_, uint32_t line_, int32_t errnoCode_, std::string explanation_)
std::string m_saveSlExplanation
std::string m_explanation
bool verify(const typename MagAOX::logger::software_log::messageT &msg)
std::string m_explanation
bool verify(const typename MagAOX::logger::software_log::messageT &msg)
CSoftwareLog_5(char *file_, uint32_t line_, std::string explanation_)
std::string m_saveSlExplanation
bool verify(const typename MagAOX::logger::software_log::messageT &msg)
CSoftwareLog_6(char *file_, uint32_t line_)
int8_t logPrioT
The type of the log priority code.
std::shared_ptr< char > bufferPtrT
The log entry buffer smart pointer.
const MagAOX::logger::Software_log_fb * GetSoftware_log_fb(const void *buf)
static constexpr logPrioT LOG_DEFAULT
Used to denote "use the default level for this log type".
const int32_t softwareLogErrnoCode_0
const char * softwareLogFile_1
const char * softwareLogFile_4
const uint32_t softwareLogLine_6
const int32_t softwareLogErrnoCode_4
const std::string softwareLogExplanation_4
const char * softwareLogExplanation_3
const int32_t softwareLogErrnoCode_1
const char * softwareLogFile_3
const std::string softwareLogExplanation_1
const char * softwareLogExplanation_0
const char * softwareLogFile_6
const uint32_t softwareLogLine_1
const uint32_t softwareLogLine_0
const std::string softwareLogExplanation_5
const uint32_t softwareLogLine_5
const int32_t softwareLogErrnoCode_3
const char * softwareLogFile_2
const char * softwareLogFile_0
const int32_t softwareLogOtherCode_0
SCENARIO("Create software_log 0", "[a log item]")
const uint32_t softwareLogLine_4
const char * softwareLogFile_5
const int32_t softwareLogOtherCode_1
const uint32_t softwareLogLine_3
const uint32_t softwareLogLine_2
const int32_t softwareLogErrnoCode_2
static flatlogs::msgLenT length(const fbMessage &msg)
Get the length of the message.
static bool verify(flatlogs::bufferPtrT &logBuff, flatlogs::msgLenT len)
A fixed-width timespec structure.