checkpointing cast tests