nir: Add unit tests for control flow graphs.