You can write a series of tests that verify that the code actually computes what you thought it computes. You can use that to test the code written by you or the code written by ChatGPT. Much harder to verify questions about science.