Please address each case in a separate thread that starts with a patch touching just that case. When you think you have a solid answer, then put the explanation in comments in the test code itself.