Circuit and test for SR type latch