mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-19 18:40:01 +02:00
WIP
This commit is contained in:
parent
1efacc9475
commit
3431752649
@ -17,7 +17,8 @@ Checks: '*,
|
||||
-google-runtime-references,
|
||||
-google-readability-todo,
|
||||
-google-readability-braces-around-statements,
|
||||
-modernize-use-trailing-return-type'
|
||||
-modernize-use-trailing-return-type,
|
||||
-readability-isolate-declaration'
|
||||
|
||||
HeaderFilterRegex: \.h
|
||||
AnalyzeTemporaryDtors: false
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
||||
#ifdef FIFODEBUG
|
||||
@ -22,8 +22,8 @@
|
||||
#endif
|
||||
|
||||
|
||||
#define STRINGIFY(x) #x
|
||||
#define TOSTRING(x) STRINGIFY(x)
|
||||
// #define STRINGIFY(x) #x
|
||||
// #define TOSTRING(x) STRINGIFY(x)
|
||||
#define MYCONCAT(x,y)
|
||||
#define __AT__ std::string(__FILE__) + std::string("::") + std::string(__func__) + std::string("(): ")
|
||||
#define __SHORT_FORM_OF_FILE__ \
|
||||
@ -162,13 +162,23 @@ inline FILE*& Output2FILE::Stream()
|
||||
return pStream;
|
||||
}
|
||||
|
||||
// inline void Output2FILE::Output(const std::string& msg)
|
||||
// {
|
||||
// FILE* pStream = Stream();
|
||||
// if (!pStream)
|
||||
// return;
|
||||
// fprintf(pStream, "%s", msg.c_str());
|
||||
// fflush(pStream);
|
||||
// }
|
||||
|
||||
inline void Output2FILE::Output(const std::string& msg)
|
||||
{
|
||||
FILE* pStream = Stream();
|
||||
if (!pStream)
|
||||
return;
|
||||
fprintf(pStream, "%s", msg.c_str());
|
||||
fflush(pStream);
|
||||
std::cout << msg;
|
||||
// FILE* pStream = Stream();
|
||||
// if (!pStream)
|
||||
// return;
|
||||
// fprintf(pStream, "%s", msg.c_str());
|
||||
// fflush(pStream);
|
||||
}
|
||||
|
||||
inline void Output2FILE::Output(const std::string& msg, TLogLevel level)
|
||||
|
@ -9,4 +9,5 @@ target_sources(tests PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test-ToString.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test-TypeTraits.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test-UdpRxSocket.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test-logger.cpp
|
||||
)
|
16
slsSupportLib/tests/test-logger.cpp
Normal file
16
slsSupportLib/tests/test-logger.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
#include "catch.hpp"
|
||||
#include "logger.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
TEST_CASE("fail"){
|
||||
|
||||
FILE_LOG(logINFO) << "A message";
|
||||
|
||||
|
||||
|
||||
|
||||
// CHECK(false);
|
||||
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user