I just finished taking an assessment test of my programming ability, and I came away feeling like I was supposed to be a Human Compiler. I'm a programmer, not a syntax machine. That's what IDE's and compilers are for. Several questions regarding source code structure and correctness about made me vomit. I didn't care if it compiled or not, it was just plain ugly! If someone on my development team wrote the crappy code that I was shown today, I would have smacked them silly. I don't care if the code works if it's not CLEAR, CONSISE, and MAINTAINABLE.
If someone else's source code is going to be used, it should be stuff that you'll see in the real world. Otherwise, these standardized tests should simply give you a set of JUnit tests, and the code you write should be run against them to determine correctness.