Convert untestable branches to assertions.

Closes #172.