add test for TypeName calculation; fix errors there