Testing RRAM and Computation-in-Memory Devices