More unit tests

Added unit tests for standard generators.

Also:
More reliable error line number using class introspection
Format error message following compiler conventions