Not necessarily. Visually inspect the bore for a bulge (there probably isn't one). Then run you finger along the outside of the barrel. If it's smooth and there's no visible bulge, it should be OK. Then try one bullet of the correct caliber. See where it strikes. If you're a good shot and it hits the bullseye, then fire off five more. If they're all OK, the barrel is fine.
BTW, someone else loaded 40S&W into my magazine for my 45 cal. Sig P220. I fired one shot, the slide didn't recoil as it normally does. I ceased fire, inspected the gun, and inserted the correct ammo and it shot normally.