Testing Computation-in-Memory Architectures Based on Emerging Memories