mirror of
https://github.com/yawut/SDL.git
synced 2026-10-02 05:06:46 -05:00
Added audio test suite; minor code cleanups in test lib
This commit is contained in:
@@ -60,7 +60,7 @@ extern "C" {
|
||||
* \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0).
|
||||
* \param assertDescription Message to log with the assert describing it.
|
||||
*/
|
||||
void SDLTest_Assert(int assertCondition, char *assertDescription, ...);
|
||||
void SDLTest_Assert(int assertCondition, const char *assertDescription, ...);
|
||||
|
||||
/**
|
||||
* \brief Assert for test cases that logs but does not break execution flow on failures. Updates assertion counters.
|
||||
@@ -70,14 +70,14 @@ void SDLTest_Assert(int assertCondition, char *assertDescription, ...);
|
||||
*
|
||||
* \returns Returns the assertCondition so it can be used to externally to break execution flow if desired.
|
||||
*/
|
||||
int SDLTest_AssertCheck(int assertCondition, char *assertDescription, ...);
|
||||
int SDLTest_AssertCheck(int assertCondition, const char *assertDescription, ...);
|
||||
|
||||
/**
|
||||
* \brief Explicitely pass without checking an assertion condition. Updates assertion counter.
|
||||
*
|
||||
* \param assertDescription Message to log with the assert describing it.
|
||||
*/
|
||||
void SDLTest_AssertPass(char *assertDescription, ...);
|
||||
void SDLTest_AssertPass(const char *assertDescription, ...);
|
||||
|
||||
/**
|
||||
* \brief Resets the assert summary counters to zero.
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#define _SDL_test_compare_h
|
||||
|
||||
#include "SDL.h"
|
||||
|
||||
#include "SDL_test_images.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
@@ -50,13 +51,13 @@ extern "C" {
|
||||
/**
|
||||
* \brief Compares a surface and with reference image data for equality
|
||||
*
|
||||
* \param sur Surface used in comparison
|
||||
* \param img Test Surface used in comparison
|
||||
* \param allowable_error Allowable difference in blending accuracy
|
||||
* \param surface Surface used in comparison
|
||||
* \param referenceSurface Test Surface used in comparison
|
||||
* \param allowable_error Allowable difference (squared) in blending accuracy.
|
||||
*
|
||||
* \returns 0 if comparison succeeded, >0 (=number of pixels where comparison failed) if comparison failed, <0 for any other error.
|
||||
* \returns 0 if comparison succeeded, >0 (=number of pixels where comparison failed) if comparison failed, -1 if any of the surfaces were NULL, -2 if the surface sizes differ.
|
||||
*/
|
||||
int SDLTest_CompareSurfaces(SDL_Surface *sur, SDL_Surface *img, int allowable_error);
|
||||
int SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *referenceSurface, int allowable_error);
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
|
||||
@@ -49,14 +49,14 @@ extern "C" {
|
||||
*
|
||||
* \param fmt Message to be logged
|
||||
*/
|
||||
void SDLTest_Log(char *fmt, ...);
|
||||
void SDLTest_Log(const char *fmt, ...);
|
||||
|
||||
/**
|
||||
* \brief Prints given message with a timestamp in the TEST category and the ERROR priority.
|
||||
*
|
||||
* \param fmt Message to be logged
|
||||
*/
|
||||
void SDLTest_LogError(char *fmt, ...);
|
||||
void SDLTest_LogError(const char *fmt, ...);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user