improve core test cases

See the single commit notes.
Is this not really implementing "xor"?