Dali 3D User Interface Engine
Macros | Functions | Variables
dali-test-suite-utils.cpp File Reference
#include "dali-test-suite-utils.h"
#include <ostream>
#include <dali/public-api/dali-core.h>
Include dependency graph for dali-test-suite-utils.cpp:

Go to the source code of this file.

Macros

#define END_TEST   return ((test_return_value>0)?1:0)
 

Functions

void tet_result (int value)
 
void tet_infoline (const char *str)
 
void tet_printf (const char *format,...)
 
bool operator== (TimePeriod a, TimePeriod b)
 
std::ostream & operator<< (std::ostream &ostream, TimePeriod value)
 
std::ostream & operator<< (std::ostream &ostream, Radian angle)
 
std::ostream & operator<< (std::ostream &ostream, Degree angle)
 
void DALI_TEST_EQUALS (const BaseHandle &baseHandle1, const BaseHandle &baseHandle2, const char *location)
 Test whether two base handles are equal. More...
 
void DALI_TEST_EQUALS (const size_t value1, const unsigned int value2, const char *location)
 Test whether a size_t value and an unsigned int are equal. More...
 
void DALI_TEST_EQUALS (const unsigned int value1, const size_t value2, const char *location)
 Test whether an unsigned int and a size_t value and are equal. More...
 
void DALI_TEST_EQUALS (const Matrix3 &matrix1, const Matrix3 &matrix2, const char *location)
 Test whether two Matrix3 objects are equal. More...
 
void DALI_TEST_EQUALS (const Matrix3 &matrix1, const Matrix3 &matrix2, float epsilon, const char *location)
 Test whether two Matrix3 objects are equal (fuzzy compare). More...
 
void DALI_TEST_EQUALS (const Matrix &matrix1, const Matrix &matrix2, const char *location)
 Test whether two Matrix objects are equal. More...
 
void DALI_TEST_EQUALS (const Matrix &matrix1, const Matrix &matrix2, float epsilon, const char *location)
 Test whether two Matrix objects are equal (fuzzy-compare). More...
 
void DALI_TEST_EQUALS (const std::string &str1, const char *str2, const char *location)
 Test whether two strings are equal. More...
 
void DALI_TEST_EQUALS (const char *str1, const std::string &str2, const char *location)
 Test whether two strings are equal. More...
 
void DALI_TEST_ASSERT (DaliException &e, std::string conditionSubString, const char *location)
 Test whether the assertion condition that failed and thus triggered the exception e contained a given substring. More...
 
BufferImage CreateBufferImage (int width, int height, const Vector4 &color)
 
BufferImage CreateBufferImage ()
 

Variables

int test_return_value = TET_UNDEF
 

Macro Definition Documentation

#define END_TEST   return ((test_return_value>0)?1:0)

Definition at line 40 of file dali-test-suite-utils.cpp.

Function Documentation

BufferImage CreateBufferImage ( int  width,
int  height,
const Vector4 color 
)
BufferImage CreateBufferImage ( )

Definition at line 321 of file dali-test-suite-utils.cpp.

References CreateBufferImage(), Dali::BufferImage::GetBuffer(), Dali::WeightObject::New(), Dali::Pixel::RGBA8888, and Dali::Color::WHITE.

Here is the call graph for this function:

void DALI_TEST_ASSERT ( DaliException e,
std::string  conditionSubString,
const char *  location 
)

Test whether the assertion condition that failed and thus triggered the exception e contained a given substring.

Parameters
[in]eThe exception that we expect was fired by a runtime assertion failure.
[in]conditionSubStringThe text that we expect to be present in an assertion which triggered the exception.
[in]locationThe TEST_LOCATION macro should be used here.

Definition at line 247 of file dali-test-suite-utils.cpp.

References Dali::DaliException::condition, TET_FAIL, TET_PASS, and tet_result().

Here is the call graph for this function:

void DALI_TEST_EQUALS ( const BaseHandle baseHandle1,
const BaseHandle baseHandle2,
const char *  location 
)

Test whether two base handles are equal.

Parameters
[in]baseHandle1The first value
[in]baseHandle2The second value
[in]locationThe TEST_LOCATION macro should be used here

Definition at line 79 of file dali-test-suite-utils.cpp.

void DALI_TEST_EQUALS ( const size_t  value1,
const unsigned int  value2,
const char *  location 
)

Test whether a size_t value and an unsigned int are equal.

Parameters
[in]value1The first value
[in]value2The second value
[in]locationThe TEST_LOCATION macro should be used here

Definition at line 84 of file dali-test-suite-utils.cpp.

References Dali::anonymous_namespace{compile-time-math.cpp}::value2.

void DALI_TEST_EQUALS ( const unsigned int  value1,
const size_t  value2,
const char *  location 
)

Test whether an unsigned int and a size_t value and are equal.

Parameters
[in]value1The first value
[in]value2The second value
[in]locationThe TEST_LOCATION macro should be used here

Definition at line 89 of file dali-test-suite-utils.cpp.

References Dali::anonymous_namespace{compile-time-math.cpp}::value1.

void DALI_TEST_EQUALS ( const Matrix3 matrix1,
const Matrix3 matrix2,
const char *  location 
)

Test whether two Matrix3 objects are equal.

Parameters
[in]matrix1The first object
[in]matrix2The second object
[in]locationThe TEST_LOCATION macro should be used here

Definition at line 94 of file dali-test-suite-utils.cpp.

References Dali::Matrix3::AsFloat(), Dali::GetRangedEpsilon(), anonymous_namespace{utc-Dali-Matrix3.cpp}::m1, anonymous_namespace{utc-Dali-Matrix3.cpp}::m2, TET_FAIL, TET_PASS, and tet_result().

Here is the call graph for this function:

void DALI_TEST_EQUALS ( const Matrix3 matrix1,
const Matrix3 matrix2,
float  epsilon,
const char *  location 
)

Test whether two Matrix3 objects are equal (fuzzy compare).

Parameters
[in]matrix1The first object
[in]matrix2The second object
[in]epsilonThe epsilon to use for comparison
[in]locationThe TEST_LOCATION macro should be used here

Definition at line 127 of file dali-test-suite-utils.cpp.

References Dali::Matrix3::AsFloat(), anonymous_namespace{utc-Dali-Matrix3.cpp}::m1, anonymous_namespace{utc-Dali-Matrix3.cpp}::m2, TET_FAIL, TET_PASS, and tet_result().

Here is the call graph for this function:

void DALI_TEST_EQUALS ( const Matrix matrix1,
const Matrix matrix2,
const char *  location 
)

Test whether two Matrix objects are equal.

Parameters
[in]matrix1The first object
[in]matrix2The second object
[in]locationThe TEST_LOCATION macro should be used here

Definition at line 157 of file dali-test-suite-utils.cpp.

References Dali::Matrix::AsFloat(), anonymous_namespace{utc-Dali-Matrix3.cpp}::m1, anonymous_namespace{utc-Dali-Matrix3.cpp}::m2, TET_FAIL, TET_PASS, and tet_result().

Here is the call graph for this function:

void DALI_TEST_EQUALS ( const Matrix matrix1,
const Matrix matrix2,
float  epsilon,
const char *  location 
)

Test whether two Matrix objects are equal (fuzzy-compare).

Parameters
[in]matrix1The first object
[in]matrix2The second object
[in]locationThe TEST_LOCATION macro should be used here

Definition at line 193 of file dali-test-suite-utils.cpp.

References Dali::Matrix::AsFloat(), anonymous_namespace{utc-Dali-Matrix3.cpp}::m1, anonymous_namespace{utc-Dali-Matrix3.cpp}::m2, TET_FAIL, TET_PASS, and tet_result().

Here is the call graph for this function:

void DALI_TEST_EQUALS ( const std::string &  str1,
const char *  str2,
const char *  location 
)

Test whether two strings are equal.

Parameters
[in]str1The first string
[in]str2The second string
[in]locationThe TEST_LOCATION macro should be used here

Definition at line 231 of file dali-test-suite-utils.cpp.

References DALI_TEST_EQUALS().

Here is the call graph for this function:

void DALI_TEST_EQUALS ( const char *  str1,
const std::string &  str2,
const char *  location 
)

Test whether two strings are equal.

Parameters
[in]str1The first string
[in]str2The second string
[in]locationThe TEST_LOCATION macro should be used here

Definition at line 242 of file dali-test-suite-utils.cpp.

References DALI_TEST_EQUALS().

Here is the call graph for this function:

std::ostream& operator<< ( std::ostream &  ostream,
TimePeriod  value 
)
std::ostream& operator<< ( std::ostream &  ostream,
Radian  angle 
)

Definition at line 67 of file dali-test-suite-utils.cpp.

References Dali::Radian::radian.

std::ostream& operator<< ( std::ostream &  ostream,
Degree  angle 
)

Definition at line 73 of file dali-test-suite-utils.cpp.

References Dali::Degree::degree.

bool operator== ( TimePeriod  a,
TimePeriod  b 
)

Definition at line 57 of file dali-test-suite-utils.cpp.

References Dali::TimePeriod::delaySeconds, Dali::TimePeriod::durationSeconds, and Dali::Equals().

Here is the call graph for this function:

void tet_infoline ( const char *  str)

Definition at line 44 of file dali-test-suite-utils.cpp.

void tet_printf ( const char *  format,
  ... 
)

Definition at line 49 of file dali-test-suite-utils.cpp.

void tet_result ( int  value)

Definition at line 31 of file dali-test-suite-utils.cpp.

References test_return_value.

Variable Documentation

int test_return_value = TET_UNDEF

Definition at line 29 of file dali-test-suite-utils.cpp.

Dali Docs Home
Read more about Dali