tests/swr: move the results out of the functions

This prevents all results from being declared whenever the function is called.

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
