test error for m cases