dunit.result.moduleresultcollection

Module for the module result collection.

License

MIT. See LICENSE for full details.

class ModuleResultCollection;

A class to hold module results.

bool empty();

Indicate if the collection is empty.

Return Value

true if the collection is empty, false if not.

size_t totalCount();

The total number of tests in the collection.

Return Value

the number of tests that dunit has run.

size_t failedCount();

The amount of tests that contain a DUnitAssertError.

Return Value

the number of tests that have failed.

size_t passedCount();

The amount of tests that don't contain a DUnitAssertError.

Return Value

the number of tests that have passed.

void add(ModuleResult result);

Add a result to the collection.

This method also sorts the collection by source and makes sure all results containing errors are at the end. This enables the console output to be more user friendly.

Parameters

ModuleResult result The module result to add.

ModuleResult[] opSlice();

Overload slicing.

Return Value

The internal collection of module results.

ModuleResult opIndex(size_t index);

Overload indexing.

Parameters

size_t index The index of the collection.

Return Value

The module result residing at the passed index.