diff options
| author | Berke Güzel <wenekar1@gmail.com> | 2026-10-13 15:05:06 +0300 |
|---|---|---|
| committer | Berke Güzel <wenekar1@gmail.com> | 2026-10-13 15:05:06 +0300 |
| commit | 98f0d51157fa2a2b8ccaae54ed4850a88d223d01 (patch) | |
| tree | 90b03d0930986620d95eb0f45c07b96e1331783c /tests/common/test_contracts.c | |
| parent | 339e1ad7adb8340732ee856d0f6f0d2c7f1455d1 (diff) | |
Simplify surface state, examples, and library installation
Diffstat (limited to 'tests/common/test_contracts.c')
| -rw-r--r-- | tests/common/test_contracts.c | 9 |
1 files changed, 9 insertions, 0 deletions
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(); |
