You would be testing them on the ability to learn a new language. You could test the same abilities using just a custom library. This is a test I used to use on intern candidates. I didn't even provide documentation, just examples of API usages, and was testing their ability to learn from example.