I was taking a photo at an airport when I accidentally zoomed my Canon SX40HS into a window. The impact wasn't super hard, but there was a thump. I cannot see any visible damage, but how can I check for damage to the picture quality (distortion, bluriness, etc)?
Well, I've damaged a manual zoom lens before, and you can actually feel damage as you adjust. With motor driven, I guess sound and performance are your best measurements.
Also, I'd bet that if there is the slightest damage it will show up best (worst?) at "infinite" focus.
But to truly know you would have to had taken a series of perfectly aligned test shots of a known test pattern when the camera came out of the box. Not to say that you might not be able to spot trouble on a series of test shots, but lining up a test surface perfectly parallel with the focal plane and directly on the centreline of the lens is tough. (meaning send it off to Canon, if you really want to know)
If you have a scene you've shot often enough to know well, you may be able to spot a problem shooting it again.
Your best bet is to simply take photos of something and look at the image. There isn't any particularly fancy way to check. If the zoom still works and pictures taken at both ends of the zoom come out sharp and don't have distortions in the image, then you are probably ok. You could probably try taking a picture of a sheet of graph paper or some other grid to get an idea if there are any alignment issues with lens elements.
The most likely 'damage' you will have to your lens is a de-centering of the elements that make up your lens. This will result in a region of your photos that is less sharp than other regions.
On a camera with a fixed lens, this is probably less of a problem than an SLR type camera with interchangeable lenses, but testing for de-centering can be approximated by taking a photo of a wall with repeating patterns (such as a brick wall) straight on. Such a straight-on shot should have everything evenly in focus. Open up the pictures on your computer and zoom in all the way to examine how different portions of the image stack up.
Keep in mind that there is going to be some normal variation across an image. Also, if you need to look that closely to find problems when you know what you're looking for, it's not really a problem.
If you cannot see any visible damage, I would suggest to just take some pictures, trying both maximum and minimum zoom lengths, and then check the results. If you want to test for distortion, you could try taking some pictures of buildings, or similar structures, that have straight lines. The pictures themselves should show you if any damage is causing blurriness.