Igalia / acacia

Library for inspecting accessibility APIs
https://igalia.github.io/acacia
GNU Lesser General Public License v2.1
8 stars 1 forks source link

Add basic unit-test cmake infra and one (smoke) test example for AT-SPI backend #174

Closed elima closed 7 months ago

elima commented 7 months ago

It is implemented using CTest infrastructure.

The idea is for this to be used as boilerplate/placeholder for adding useful unit-tests in the future. For that, I suppose we will need some API to craft accessibility trees out of thin air (e.g, without depending on a running app) to then start adding meaningful unit-tests against them.

Running the tests is as simple as a make test.

The patch includes:

Fixes #48

elima commented 7 months ago

Example output:

$ make test
Running tests...
Test project AXAccess/build
    Start 1: test_smoke
1/3 Test #1: test_smoke .......................   Passed    0.02 sec
    Start 2: test_smoke_py
2/3 Test #2: test_smoke_py ....................   Passed    0.04 sec
    Start 3: test_smoke_js
3/3 Test #3: test_smoke_js ....................   Passed    0.11 sec

100% tests passed, 0 tests failed out of 3

Total Test time (real) =   0.18 sec
elima commented 7 months ago

looks great! As a next step, can we run these in the github CI?

Yes, that's the idea. I will roll that out to https://github.com/Igalia/AXAccess/pull/132 once I get it to work.