Rod Elliott of Elliott Sound Products wrote a good article on using square waves to analyse amplifiers. Early in the article he shows that using a "real" square wave is not really useful as it can show issues that will never exist with music. Instead he uses a "bandwidth limited square wave" which still pushes the amp without being completely unrealistic. Here is the link with an excerpt from the article regarding bandwidth limited square wave below.
https://sound-au.com/articles/squarewave.htm
When the input waveform is significantly faster than the amplifier stage, the leading and trailing edges will no longer be vertical, because the amplifying circuit has a limited bandwidth. It is very easy to perform a square wave test and end up with an entirely wrong answer if you're not careful. Much of the brouhaha that developed regarding TIM (transient intermodulation distortion) and/or SID (slew induced distortion) were due to the very fast risetime of the test signal. When testing any audio device, you must be aware of the simple fact that music
does not contain very fast risetime signals, and most media (vinyl, CD, etc.) are actually not very demanding. This is because the amplitude of the musical harmonics is reduced by at least 6dB/octave from no higher than 2kHz or so. This means that the actual level at 20kHz will typically be 20dB lower than the level at midrange frequencies.
Therefore, an amplifier that can provide ±35V peaks will only be required to provide around ±3.5V peaks at 20kHz when operating just below full power with music as the input. This dramatically changes the required slew rate, but it's very common (and advisable) to ensure that an amplifier can reproduce no less than 50% output voltage at 20kHz to ensure an acceptable safety margin. TIM may have been discredited (along with its siblings), but it doesn't make any sense to limit an amplifier if it's not necessary. It also doesn't make sense to go to a great deal of additional effort to design an amplifier that can reproduce full power at 100kHz (or even 20kHz), because it will never be needed.
Most competent amplifiers can handle a band-limited squarewave with no fuss. Before using the squarewave, it should be passed through a filter that rolls off the response above 20kHz. Failure to use bandwidth limiting won't hurt the amplifier, but you may see artifacts that will not appear in normal use. A low-pass filter using a 1k resistor and 10nF capacitor gives a response that's considerably faster than the harmonic structure of music, but doesn't stress any amplifier too hard. The filter has a nominal -3dB frequency of 15.9kHz. My function generator has a risetime of 12ns for a 1V RMS squarewave - much too fast for even the most esoteric amplifier, so a filter is needed to prevent the DUT from slew rate limiting.
Figure 2 - Band Limited 1kHz Squarewave
The waveform shows the same squarewave seen in Figure 1A, but with a 1k + 10nF capacitor arranged as a low pass filter. So the waveform is easier to see, only four complete cycles are shown. This will be the case for all subsequent waveforms, and where possible the same vertical scale will be used as well. From this waveform, you can see the result of a low pass filter - the risetime is increased. As the input frequency approaches the filter's frequency, the effect becomes more obvious. Equally obvious is any circuit that applies high frequency boost, but we'll look at that in the next section.
It's also worth examining the risetime - it's usually measured between 10% and 90% of the waveform's peak-to-peak amplitude. The reason for this is simple, in that many circuits will have some small 'disturbance' as the voltage starts to change and just before it reaches the opposite peak voltage. By excluding the fist and last 10% of the waveform these disturbances are minimised and the true risetime (and from that the slew rate) can be determined more accurately.