I assumed that "tests" refers to a program too, which in this example is likely GPL. Thus GPL would stick already on the AI-rewrite of GPL test code.
If "tests" should mean a proper specification let's say some IETF RFC of a protocol, then that would be different.