Added infrastructure for testing CHECK failures.
Self-review.