rough tests for cast and fold