No, there's no code to test your phone's built-in IR blaster. However, you can test your phone's IR blaster by simply installing an IR Blaster app. Once installed, you will need a second phone with a front camera. Using your phones IR Blaster, point it to your second phone's front camera. Observe the display of the second phone. If the color of the display changes, then your phone IR Blaster is working.