mirror of
https://github.com/Kbz-8/Pulse.git
synced 2026-01-11 23:43:34 +00:00
working on images, adding unit tests for image and buffers
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
#include "Common.h"
|
||||
#include <unity/unity.h>
|
||||
|
||||
bool errors_enabled = true;
|
||||
|
||||
void DebugCallBack(PulseDebugMessageSeverity severity, const char* message)
|
||||
{
|
||||
if(severity == PULSE_DEBUG_MESSAGE_SEVERITY_ERROR)
|
||||
if(errors_enabled && severity == PULSE_DEBUG_MESSAGE_SEVERITY_ERROR)
|
||||
TEST_FAIL_MESSAGE(message);
|
||||
}
|
||||
|
||||
@@ -22,6 +24,17 @@ void SetupPulse(PulseBackend* backend)
|
||||
PulseSetDebugCallback(*backend, DebugCallBack);
|
||||
}
|
||||
|
||||
void SetupDevice(PulseBackend backend, PulseDevice* device)
|
||||
{
|
||||
*device = PulseCreateDevice(backend, NULL, 0);
|
||||
TEST_ASSERT_NOT_EQUAL_MESSAGE(device, PULSE_NULL_HANDLE, PulseVerbaliseErrorType(PulseGetLastErrorType()));
|
||||
}
|
||||
|
||||
void CleanupDevice(PulseDevice device)
|
||||
{
|
||||
PulseDestroyDevice(device);
|
||||
}
|
||||
|
||||
void CleanupPulse(PulseBackend backend)
|
||||
{
|
||||
PulseUnloadBackend(backend);
|
||||
|
||||
Reference in New Issue
Block a user