improve tests in single.ml by verifying the exception codes