Unknown unitary transforms may be compared to each other in a way which makes it possible to obtain an unambiguous answer, indicating that the transforms are different, already after a single application of each transform. Quantum comparison strategies may be useful for example if we want to test the performance of individual gates in a quantum information or quantum computing network. It is then possible to check for errors by comparing the elements to a master copy of the gate, instead of performing a complete tomography of the gate. In this paper we propose a versatile linear optical implementation based on the Franson interferometer with short and long arms. A click in the wrong output port unambiguously determines that the tested gate is faulty. This set-up can also be used for a variety of other tasks, such as confirming that the two transforms do not commute or do not anticommute.