Test types.halt function