test only if test flag is true