added tests cases for deftype