To do this I use a fixture on a surface plate. I run the square along its edge over abrasive with a fixture maintaining perpendicular.

I then check the square on another surface plate with a 90 degree angle plate which has been hand scraped into accuracy. I shine a light behind the square and turn the lights off in the shop. When the two agree, then the square is accurate.