4#ifndef QABSTRACTTESTLOGGER_P_H
5#define QABSTRACTTESTLOGGER_P_H
18#include <QtTest/qttestglobal.h>
19#include <QtCore/private/qglobal_p.h>
20#include <QtCore/qbytearrayalgorithms.h>
60 virtual void startLogging();
61 virtual void stopLogging();
69 const char *
file =
nullptr,
int line = 0) = 0;
77 const char *
file =
nullptr,
int line = 0) = 0;
79 bool isLoggingToStdout()
const;
81 void outputString(
const char *msg);
84 void filterUnprintable(
char *
str)
const;
101 if (
buf != staticBuf)
127 char *newBuf =
nullptr;
128 if (
buf == staticBuf) {
130 newBuf =
reinterpret_cast<char *
>(malloc(newSize));
135 newBuf =
reinterpret_cast<char *
>(realloc(
buf, newSize));
148 return newSize <= _size ||
reset(newSize,
true);
Base class for test loggers.
virtual void addBenchmarkResult(const QBenchmarkResult &result)=0
This virtual method is called after a benchmark has been run enough times to produce usable data.
virtual void leaveTestFunction()=0
This virtual method is called after a test function has completed, to match \l enterTestFunction().
IncidentTypes
\value Pass The test ran to completion successfully.
virtual void enterTestData(QTestData *)
This virtual method is called before and after each call to a test function.
MessageTypes
The members whose names begin with Q describe messages that originate in calls, by the test or code u...
virtual void enterTestFunction(const char *function)=0
This virtual method is called before each test function is invoked.
virtual void addMessage(MessageTypes type, const QString &message, const char *file=nullptr, int line=0)=0
This is an overloaded member function, provided for convenience. It differs from the above function o...
virtual void addIncident(IncidentTypes type, const char *description, const char *file=nullptr, int line=0)=0
This virtual method is called when an event occurs that relates to the resolution of the test.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
void generateTestIdentifier(QTestCharBuffer *identifier, int parts)
bool appendCharBuffer(QTestCharBuffer *accumulator, const QTestCharBuffer &more)
int qt_asprintf(QTestCharBuffer *str, const char *format,...)
static jboolean copy(JNIEnv *, jobject)
Q_CORE_EXPORT char * qstrncpy(char *dst, const char *src, size_t len)
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint GLsizei const GLchar * message
GLint GLsizei GLsizei GLenum format
bool reset(int newSize, bool copy=false)
const char * constData() const