Add unit tests for error and integer type