Currently the test still passes even if one of the check_translations() calls fail.
The reason is that check_translations() is a function which has its own scope, so if it sets "failed" the upper level doesn't see it.
Use the PARENT_SCOPE option when setting the variable to properly propagate the value to the upper level.