add unit tests for cpu/gpu copy functions