Add test for assignment in both branches of if-else