We describe a method for the accurate calculation of bound-state and resonance energies for one-dimensional potentials. We calculate the shape resonances for symmetric two-barrier potentials and compare them with those coming from the Siegert approximation, the complex scaling method and the box-stabilization method. A comparison of the Breit-Wigner profile and the transmission coefficient about its maximum illustrates that the better the agreement, the sharper the resonance.