[go: up one dir, main page]

Skip to content
Grigori Goronzy edited this page Sep 17, 2017 · 1 revision

Test Strategy

libass isn't automatically tested at all yet. Here's a proposed test strategy.

System level tests

System tests use existing scripts or full scripts as test cases for specific bugs or features and render single frames or a sequence of frames. By running with a test program we can check various things:

  1. Check for crashes
  2. Check for undefined behaviour, memory leaks etc. (with ubsan or similar)
  3. Check for unexpected errors in the log output
  4. Check output against reference image(s) (rather complicated and error prone)

Integration (API) tests

Verify that the API behaves as expected. Needs specific test cases and scenarios.

Unit tests

Test individual parts of libass. This will need refactoring and redesign of some parts of libass to make it possible to isolate suitable units.

Potential first candidates for unit testing are:

  • Rasterizer
  • Parser
  • Shaper
  • Vector drawings

It's an open question how building of unit tests can be integrated into libass and how mocking can possibly be done.