roc-streaming / roc-toolkit

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

Add unit tests for allocation errors #740

Open gavv opened 1 week ago

gavv commented 1 week 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: