add struct copy test code