Android: A faulty charger can cause your smartphone a world of hurt. If you're running Lollipop on your phone, free app Ampere tests your charger's output.
Ampere tells you how well your battery is charging and if there's a problem. It doesn't work on all phones, but you can see the compatible list on its Google Play page—I tested it on a Nexus 5. It found one old charger that wasn't pushing enough of a charge, and all the rest tested fine.