edbee - Qt Editor Library v0.11.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
test.h File Reference
#include "edbee/exports.h"
#include <QObject>
#include <QString>
#include <QSharedPointer>
#include <QTextStream>
+ Include dependency graph for test.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  edbee::test::TestResult
 This method represents a test result. More...
 
class  edbee::test::TestCase
 I really really hate the QTestLib output on my Mac. It's a very ugly xwindows console result. More...
 
class  edbee::test::OutputHandler
 This is the basic outputhandler. The basic outputhandler simply executes a qDebug with the given information. More...
 
class  edbee::test::TestEngine
 This is the main test engine. More...
 
class  edbee::test::Test< T >
 

Namespaces

namespace  edbee
 QT Acessibility has an issue with reporting blank lines between elements lines. defining 'WINDOWS_EMPTY_LINE_READING_ERROR_FIX' adds a \r before a newline. Which is a workaround for this issue. (It does some offset-length and string magic when this is enabled)
 
namespace  edbee::test
 

Macros

#define TEST_CONCATENATE_DETAIL(x, y)
 @TODO: Replace these tests with the standard Qt testing framework
 
#define TEST_CONCATENATE(x, y)
 
#define TEST_MAKE_UNIQUE(x)
 
#define DECLARE_TEST(className)
 
#define DECLARE_NAMED_TEST(name, className)
 
#define GET_3TH_ARG(arg1, arg2, arg3, ...)
 
#define GET_4TH_ARG(arg1, arg2, arg3, arg4, ...)
 
#define testTrue_1(statement)
 
#define testTrue_2(statement, message)
 
#define testTrue_MACRO_CHOOSER(...)
 
#define testTrue(...)
 
#define testFalse(statement)
 
#define testEqual_1(actual, expected)
 
#define testEqual_2(actual, expected, message)
 
#define testEqual_MACRO_CHOOSER(...)
 
#define testEqual(...)
 
#define testSkip(msg)
 

Functions

template<class T>
QString edbee::test::toQString (const T &obj)
 
TestEngineedbee::test::engine ()
 

Macro Definition Documentation

◆ DECLARE_NAMED_TEST

#define DECLARE_NAMED_TEST ( name,
className )
Value:
Definition test.h:312
#define TEST_MAKE_UNIQUE(x)
Definition test.h:22

◆ DECLARE_TEST

#define DECLARE_TEST ( className)
Value:

◆ GET_3TH_ARG

#define GET_3TH_ARG ( arg1,
arg2,
arg3,
... )
Value:
arg3

◆ GET_4TH_ARG

#define GET_4TH_ARG ( arg1,
arg2,
arg3,
arg4,
... )
Value:
arg4

◆ TEST_CONCATENATE

#define TEST_CONCATENATE ( x,
y )
Value:
#define TEST_CONCATENATE_DETAIL(x, y)
@TODO: Replace these tests with the standard Qt testing framework
Definition test.h:20

◆ TEST_CONCATENATE_DETAIL

#define TEST_CONCATENATE_DETAIL ( x,
y )
Value:
x##y

@TODO: Replace these tests with the standard Qt testing framework

◆ TEST_MAKE_UNIQUE

#define TEST_MAKE_UNIQUE ( x)
Value:
TEST_CONCATENATE(x, __COUNTER__)
#define TEST_CONCATENATE(x, y)
Definition test.h:21

◆ testEqual

#define testEqual ( ...)
Value:
testEqual_MACRO_CHOOSER(__VA_ARGS__)(__VA_ARGS__)
#define testEqual_MACRO_CHOOSER(...)
Definition test.h:139

◆ testEqual_1

#define testEqual_1 ( actual,
expected )
Value:
do { \
QString actualStr = edbee::test::toQString(actual); \
QString expectedStr = edbee::test::toQString(expected); \
testEqualImpl( ( actualStr ) == ( expectedStr ), actualStr, expectedStr, #actual, #expected, "", __FILE__, __LINE__ ); \
} while( false )
QString toQString(const T &obj)
Definition test.h:40

◆ testEqual_2

#define testEqual_2 ( actual,
expected,
message )
Value:
do \
QString actualStr = edbee::test::toQString(actual); \
QString expectedStr = edbee::test::toQString(expected); \
testEqualImpl( ( actualStr ) == ( expectedStr ), actualStr, expectedStr, #actual, #expected, (message), __FILE__, __LINE__ ); \
} while( false )

◆ testEqual_MACRO_CHOOSER

#define testEqual_MACRO_CHOOSER ( ...)
Value:
#define GET_4TH_ARG(arg1, arg2, arg3, arg4,...)
Definition test.h:113
#define testEqual_2(actual, expected, message)
Definition test.h:132
#define testEqual_1(actual, expected)
Definition test.h:126

◆ testFalse

#define testFalse ( statement)
Value:
testTrue( !statement )
#define testTrue(...)
Definition test.h:120

◆ testSkip

#define testSkip ( msg)
Value:
testSkipImpl( msg, __FILE__, __LINE__)

◆ testTrue

#define testTrue ( ...)
Value:
testTrue_MACRO_CHOOSER(__VA_ARGS__)(__VA_ARGS__)
#define testTrue_MACRO_CHOOSER(...)
Definition test.h:118

◆ testTrue_1

#define testTrue_1 ( statement)
Value:
testTrueImpl( ( statement ) ? true : false, #statement, "", __FILE__, __LINE__)

◆ testTrue_2

#define testTrue_2 ( statement,
message )
Value:
testTrueImpl( ( statement ) ? true : false, #statement, (message), __FILE__, __LINE__ )

◆ testTrue_MACRO_CHOOSER

#define testTrue_MACRO_CHOOSER ( ...)
Value:
#define testTrue_2(statement, message)
Definition test.h:117
#define GET_3TH_ARG(arg1, arg2, arg3,...)
Definition test.h:112
#define testTrue_1(statement)
Definition test.h:116