random type generation and corresponding unit test of type parser