tests: enforce deterministic pointer behavior (flat accel + fixed sensitivity)

This commit is contained in:
B2krobbery 2026-05-04 00:13:24 +05:30
parent f1a61584cf
commit eed0713cf8
2 changed files with 6 additions and 6 deletions

View file

@ -126,14 +126,14 @@ static bool sendScroll(int delta) {
}
TEST_CASE(pointerScroll) {
NLog::log("{}Skipping pointerScroll test (CI unstable)", Colors::YELLOW);
return;
std::optional<CClient> client;
try {
client.emplace();
} catch (...) { FAIL_TEST("Couldn't start the client"); }
// Force deterministic input behavior
EXPECT(getFromSocket("r/eval hl.config({ input = { accel_profile = 'flat', sensitivity = 1.0 } })"), "ok");
EXPECT(getFromSocket("r/eval hl.config({ input = { emulate_discrete_scroll = 0 } })"), "ok");
EXPECT(sendScroll(10), true);

View file

@ -151,14 +151,14 @@ static bool isCursorPos(int x, int y) {
}
TEST_CASE(pointerWarp) {
NLog::log("{}Skipping pointerWarp test (CI unstable)", Colors::YELLOW);
return;
std::optional<CClient> client;
try {
client.emplace();
} catch (...) { FAIL_TEST("Couldn't start the client"); }
// Force deterministic pointer movement (no accel, fixed sensitivity)
EXPECT(getFromSocket("r/eval hl.config({ input = { accel_profile = 'flat', sensitivity = 1.0 } })"), "ok");
EXPECT(client->sendWarp(100, 100), true);
EXPECT(isCursorPos(100, 100), true);