Curiously enough,if the barrel is REASONABLY straight,it will still shoot accurately. It will alter the point of impact so you have to set the sights.
On a SMOOTH bore,you sight through the bore towards a light source,but not directly into the light. A straight bore will show uninterrupted straight rays of light. A lightly bent bore will show partial rays of light from muzzle to breech. Then,the barrel is straightened. This is how they test hand made unrifled barrels in Williamsburg. After they are made straight,they are rifled by pulling a cutter through them 600 times.