Add unit tests for compiler