Add unit tests for IR builder.