Testing Bell inequalities with weak measurements