That depends on the coding test you give and how you set expectations with the candidate. When I gave coding tests, I wasn't giving syntax tests - i.e. their syntax was largely irrelevant. I asked them to think out loud, ask as many questions as they want, use google all they want. It's not a rote memorization test; it's a conversation exploring their logic and thought processes.