unit test for cprerr, fix wreorder's