more tests, fixed one small c-alignment bug in ensure_type()