Hate these tests. Long ago I had one in C++ and it was about 80% STL. I've never used STL. I ended up getting the job but I had to explain it to them; fortunately I'd gotten every non-STL question right.
I've never asked anyone to write code in an interview.