summaryrefslogtreecommitdiff
path: root/test/helpers.cpp
blob: 6cb6fdcc6645c1c2997fbb536f61cd24561cd20d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "helpers.h"

MemStream::MemStream() : out {nullptr}, len {}, s {open_memstream(&out, &len)} { }

MemStream::~MemStream()
{
	fclose(s);
	free(out);
}

void
MemStream::flush()
{
	fflush(s);
}

EventCounterTarget &
EventCounterTarget::add(mariadb_rpl_event e, unsigned long n)
{
	counters[e] += n;
	return *this;
}