Add tests for custom types.
Merge pull request #6 from andrei-alpha/custom_type_tests

Add tests for custom types.