- Added comprehensive unit tests for audio functionalities, including playback control, volume adjustments, and source management. - Implemented new tests for data handling, focusing on ByteData and DataView functionalities, ensuring proper memory management and error handling. - Updated CMakeLists to include new test files for improved coverage and organization. - Enhanced event handling tests to verify message processing and variant functionalities.
27 lines
550 B
C++
27 lines
550 B
C++
#include "zeroerr/assert.h"
|
|
#include "zeroerr/unittest.h"
|
|
|
|
#include "common/Exception.h"
|
|
#include "touch/Touch.h"
|
|
|
|
#include <cstdint>
|
|
|
|
TEST_CASE("touch.getTouchesEmpty") {
|
|
auto* t = eve::touch::Touch::create();
|
|
REQUIRE(t != nullptr);
|
|
CHECK(t->getTouches().empty());
|
|
}
|
|
|
|
TEST_CASE("touch.getTouchInvalidThrows") {
|
|
auto* t = eve::touch::Touch::create();
|
|
REQUIRE(t != nullptr);
|
|
|
|
bool threw = false;
|
|
try {
|
|
(void)t->getTouch(999);
|
|
} catch (const eve::Exception&) {
|
|
threw = true;
|
|
}
|
|
CHECK(threw);
|
|
}
|