Added unit tests of type-functions.