Files
EVEngine/test/touch.cpp
T
西风逍遥游 e21dbcf1ea feat: enhance audio and data handling with new test cases
- 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.
2026-08-05 17:51:48 +08:00

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);
}