convert mask test to new test macros

Signed-off-by: Matthias Kretz <kretz@kde.org>
tests: C++11 variant of for_all_masks using a closure and random masks instead of all masks

Signed-off-by: Matthias Kretz <kretz@kde.org>