When the pushbutton switch closes, capacitors CREF and CX charge through their respective PNP transistors. When the switch opens, the capacitors begin to discharge. CREF, assuming that it is in good condition, has an additional discharge external resistance, RREF. The capacitor under test, CX, discharges through its internal resistance. If the leakage in CX is greater than that of CREF through RREF, then its voltage will fall faster. Thus, the voltage at the op amp’s noninverting input will be lower than at its inverting input, forcing the op amp’s output low and lighting the red LED. This LED indicates that the test capacitor leaks. Testing of the circuit reveals that even a 1-nF ceramic capacitor holds against the reference. Check the voltage rating on the test capacitor to make sure that it is higher than the voltage to which it will be charged—in this case, VSUPPLY is −1.8V.
For More Details: Circuit lets you test capacitors for leakage