Add assertions to compiler unit tests