Add tests for typecasting.