Can't tell what "passed a water test" means without seeing the numbers. Ammonia and nitrite should be at 0 and nitrate should have some kind of reading above 10 ppm.
Did you do a water change? How much?
Your fish is obviously in distress and the reason for all the questions is to help him, and help you make it better for him.