mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Use doctest macro to tie Reporter output to test cases
This commit is contained in:
parent
93ee353f30
commit
2d43aaf7cc
1 changed files with 7 additions and 2 deletions
|
@ -9,6 +9,7 @@
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include "zeek/3rdparty/doctest.h"
|
||||||
#include "zeek/Conn.h"
|
#include "zeek/Conn.h"
|
||||||
#include "zeek/Desc.h"
|
#include "zeek/Desc.h"
|
||||||
#include "zeek/Event.h"
|
#include "zeek/Event.h"
|
||||||
|
@ -676,10 +677,14 @@ void Reporter::DoLog(const char* prefix, EventHandlerPtr event, FILE* out, Conne
|
||||||
}
|
}
|
||||||
|
|
||||||
s += buffer;
|
s += buffer;
|
||||||
s += "\n";
|
|
||||||
|
|
||||||
if ( out )
|
if ( doctest::is_running_in_test )
|
||||||
|
MESSAGE(s);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
s += "\n";
|
||||||
fprintf(out, "%s", s.c_str());
|
fprintf(out, "%s", s.c_str());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( alloced )
|
if ( alloced )
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue