BoundFunctionTest.cpp File Reference

#include "Qt.h" [code]
#include "../BoundFunction.h" [code]
#include "../ExpectedFunction.h" [code]
#include "Imports.cpp" [code]

Include dependency graph for BoundFunctionTest.cpp:

Go to the source code of this file.

Namespaces

namespace  Utils
namespace  Utils::CalitkoMocks
namespace  Utils::CalitkoMocks::Testing

Classes

class  Utils::CalitkoMocks::Testing::BoundFunctionTest
 Tests for class BoundFunction. More...

Defines

#define TEST_VOID_FOO(type)
 A macro to easier test a bound function returning void was called.
#define TEST_FOO(type, ret)
 A macro to easier test a bound function returning non-void was called.
#define TEST_MESSAGE(summary, description)   CPPUNIT_ASSERT (e.message() == Message (summary, description))
 A macro to easier test that a thrown exception has the correct message set.
#define TEST_SOURCELINE(filename, line)   CPPUNIT_ASSERT (e.sourceLine() == SourceLine (filename, line))
 A macro to easier test if a thrown exception has the correct soureline set.

Functions

 Utils::CalitkoMocks::Testing::CPPUNIT_TEST_SUITE_REGISTRATION (BoundFunctionTest)


Define Documentation

#define TEST_FOO type,
ret   ) 
 

Value:

type##Ok = false;                   \
    foo.willReturn (ret);               \
    foo.call();                         \
    CPPUNIT_ASSERT (type##Ok == true)
A macro to easier test a bound function returning non-void was called.

Definition at line 34 of file BoundFunctionTest.cpp.

#define TEST_MESSAGE summary,
description   )     CPPUNIT_ASSERT (e.message() == Message (summary, description))
 

A macro to easier test that a thrown exception has the correct message set.

Definition at line 41 of file BoundFunctionTest.cpp.

#define TEST_SOURCELINE filename,
line   )     CPPUNIT_ASSERT (e.sourceLine() == SourceLine (filename, line))
 

A macro to easier test if a thrown exception has the correct soureline set.

Definition at line 45 of file BoundFunctionTest.cpp.

#define TEST_VOID_FOO type   ) 
 

Value:

type##Ok = false; foo.call();       \
    CPPUNIT_ASSERT (type##Ok == true)
A macro to easier test a bound function returning void was called.

Definition at line 29 of file BoundFunctionTest.cpp.