MoSync 3.3
testify.hpp File Reference

Asserts and macros for Testify. More...

#include "common.h"
#include "bind.hpp"
#include "test.hpp"
#include "testhook.hpp"
#include "testcase.hpp"
#include "testfunction.hpp"
#include "testmanager.hpp"

Defines

#define PTESTMANAGER   (Testify::TestManager::getInstance( ))
#define TESTIFY_ASSERT(cond)
#define TESTIFY_ASSERT_FALSE(cond)   TESTIFY_ASSERT( !cond )
#define TESTIFY_ASSERT_EQUAL(a, b)   TESTIFY_ASSERT( a == b )
#define TESTIFY_ASSERT_NOT_EQUAL(a, b)   TESTIFY_ASSERT( a != b )
#define TESTIFY_ASSERT_LESS(a, b)   TESTIFY_ASSERT( a < b )
#define TESTIFY_ASSERT_LESS_EQUAL(a, b)   TESTIFY_ASSERT( a <= b )
#define TESTIFY_ASSERT_GREATER(a, b)   TESTIFY_ASSERT( a > b )
#define TESTIFY_ASSERT_GREATER_EQUAL(a, b)   TESTIFY_ASSERT( a >= b )
#define TESTIFY_DECL_TEST_FUNC(name)

Detailed Description

Asserts and macros for Testify.

Author:
Ali Mosavian

Created on: 1 mar 2010


Define Documentation

#define TESTIFY_ASSERT (   cond)
Value:
if ( (cond) == false ) { \
                PTESTMANAGER->testFailed( __FILE__, __LINE__, #cond ); \
                return; \
        }
#define TESTIFY_ASSERT_FALSE (   cond)    TESTIFY_ASSERT( !cond )
#define TESTIFY_ASSERT_EQUAL (   a,
 
)    TESTIFY_ASSERT( a == b )
#define TESTIFY_ASSERT_NOT_EQUAL (   a,
 
)    TESTIFY_ASSERT( a != b )
#define TESTIFY_ASSERT_LESS (   a,
 
)    TESTIFY_ASSERT( a < b )
#define TESTIFY_ASSERT_LESS_EQUAL (   a,
 
)    TESTIFY_ASSERT( a <= b )
#define TESTIFY_ASSERT_GREATER (   a,
 
)    TESTIFY_ASSERT( a > b )
#define TESTIFY_ASSERT_GREATER_EQUAL (   a,
 
)    TESTIFY_ASSERT( a >= b )
#define TESTIFY_DECL_TEST_FUNC (   name)
Value:
void name ( void ); \
        static TestHook hook_##name( Testify::bind( name ), #name ); \
        void name ( void )
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines