closed #2517: Update all test cases use auto for local variables