roc-streaming / roc-toolkit

Real-time audio streaming over the network.
https://roc-streaming.org
Mozilla Public License 2.0
1.09k stars 213 forks source link

Add unit tests for allocation errors #740

Open gavv opened 5 months ago

gavv commented 5 months ago

Many pipeline elements take core::IArena as an argument and perform some allocations in constructor. If allocations fails, the convention is to report error (StatusNoMem) via init_status() method.

We need to cover this behavior with unit tests. For each element, we need to add one test that creates the element using mock, which always fails (e.g. core::NoopArena). Then we should check that the element returned StatusNoMem via init_status().

Elements to cover: