40 using LERR_(LIFECYCLE);
53 UNIMPLEMENTED (
"some verifiable test/dummy buffer accessing operations");
123 CHECK (desc2.verifyValidity());
127 CHECK (num1 == TEST_ELMS);
128 CHECK (0 < num2 && num2 <=TEST_ELMS);
131 char storage[STORAGE_SIZE];
139 for_each (tab.
buffers(), do_some_calculations);
164 CHECK (
sizeof(
TestFrame) == handle_A.size());
165 CHECK (
sizeof(
int ) == handle_B.
size());
166 CHECK (
sizeof(
int ) == handle_C.
size());
169 CHECK (isSameObject (*handle_A, embeddedFrame));
170 CHECK (embeddedFrame.
isAlive());
171 CHECK (embeddedFrame.
isSane());
180 CHECK (embeddedFrame.
isDead());
181 CHECK (embeddedFrame.
isSane());
210 NOTREACHED (
"Dummy ctor should fail");
Extension to allow placing objects right into the buffers, taking ownership.
helper for organisation of render data buffers Used during the process of _"pulling"_ a render node,...
A Dummy object for tests.
static void activateCtorFailure(bool indeed=true)
An opaque descriptor to identify the type and further properties of a data buffer.
bool verifyValidity() const
Handle for a buffer for processing data, abstracting away the actual implementation.
BU & accessAs()
convenience shortcut: access the buffer contents casted to a specific type.
BU & create()
convenience shortcut: place and maintain an object within the buffer.
Builder & announce(uint count, BuffDescr const &type)
Interface: a facility providing and managing working buffers for media calculations.
uint announce(uint count, BuffDescr const &)
BufferProvider API: declare in advance the need for working buffers.
BuffHandle lockBufferFor(ARGS ...args)
convenience shortcut: prepare and claim ("lock") a buffer suitable to hold an object of the given typ...
BuffDescr getDescriptor(ARGS ...args)
define a "buffer type" for automatically creating an instance of the template type embedded into the ...
BuffDescr getDescriptorFor(size_t storageSize=0)
describe the kind of buffer managed by this provider
BuffHandle lockBuffer(BuffDescr const &)
BufferProvider API: retrieve a single buffer for exclusive use.
Helper for unit tests: Buffer provider reference implementation.
bool buffer_was_closed(uint bufferID) const
bool buffer_was_used(uint bufferID) const
static DiagnosticBufferProvider & access(BufferProvider const &)
access the diagnostic API of the buffer provider
bool all_buffers_released() const
static BufferProvider & build()
build a new Diagnostic Buffer Provider instance, discard the existing one.
void * accessMemory(uint bufferID) const
void verifyObjectAttachmentFailure()
void verifyStandardCase()
void verifyObjectAttachment()
Mock data frame for simulated rendering.
static bool isDead(void *memLocation)
Helper to verify a given memory location holds an already destroyed TestFrame instance.
static bool isAlive(void *memLocation)
Helper to verify that a given memory location holds an active TestFrame instance (created,...
A facility for writing unit-tests targeting the BufferProvider interface.
Lumiera error handling (C++ interface).
void do_some_calculations(BuffHandle const &buffer)
TestFrame & testData(uint seqNr, uint chanNr)
Helper to access a specific frame of test data at a fixed memory location.
Steam-Layer implementation namespace root.
Test runner and basic definitions for tests.
bool isSameObject(A const &a, B const &b)
compare plain object identity, based directly on the referee's memory identities.
disable_if< can_IterForEach< Container >, FUN > for_each(Container const &coll, FUN doIt)
operate on all elements of a STL container.
Simplistic test class runner.
#define LAUNCHER(_TEST_CLASS_, _GROUPS_)
Tables of buffer handles and corresponding dereferenced buffer pointers.
static Builder & prepare(const size_t STORAGE_SIZE, void *storage)
A collection of frequently used helper functions to support unit testing.
#define VERIFY_ERROR(ERROR_ID, ERRONEOUS_STATEMENT)
Macro to verify that a statement indeed raises an exception.
Unit test helper to generate fake test data frames.
unittest helper code: test dummy objects to track instances.
Perform operations "for each element" of a collection.