Add test cases for pointer.go