To provide an IC testing device capable of automatically detecting a phase difference when the phase difference is generated between signals and of automatically canceling the phase difference.
A signal selecting circuit 30 selects two testing signals from testing patterns to be applied to a testing device and outputs them as a reference signal and a comparing signal. A phase difference extracting circuit 40 extracts a phase difference between the reference signal and comparing signal. A mask circuit 50 generates a mask by which unnecessary one in the phase differences extracted by the phase difference extracting circuit 40 is removed. A phase difference detecting circuit 60 detects whether or not the phase difference is existing in the extracted result and instructs a counter circuit 90 to count up or not. A phase fail detecting circuit 70 detects whether or not the phase of the comparing signal advances rather than that of the reference signal and outputs a fail signal. When the fail signal is not outputted, the counter circuit 90 determines a delay quantity to delays the comparing signal.