From 98f0d51157fa2a2b8ccaae54ed4850a88d223d01 Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Tue, 13 Oct 2026 15:05:06 +0300 Subject: Simplify surface state, examples, and library installation --- tests/common/test_contracts.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/common/test_contracts.c') diff --git a/tests/common/test_contracts.c b/tests/common/test_contracts.c index ac0065c..ee6fe61 100644 --- a/tests/common/test_contracts.c +++ b/tests/common/test_contracts.c @@ -25,6 +25,14 @@ static void test_timing_clock(void) assert(stats.max_us == 500.0); } +static void test_surface_state(void) +{ + /* Reading reported flags does not require a backend query or display. */ + struct yasl_surface surface = {.state = YASL_STATE_FULLSCREEN | YASL_STATE_ACTIVATED}; + assert(!yasl_surface_state(NULL)); + assert(yasl_surface_state(&surface) == (YASL_STATE_FULLSCREEN | YASL_STATE_ACTIVATED)); +} + static void test_queue(void) { struct input_queue q = {0}; @@ -326,6 +334,7 @@ static void test_errors(void) int main(void) { test_timing_clock(); + test_surface_state(); test_queue(); test_validation(); test_native(); -- cgit v1.2.3