Package io.codemodder.testutils.llm
Class LLMAssistedCodemodTest
java.lang.Object
io.codemodder.testutils.llm.LLMAssistedCodemodTest
An
LLMAssistedCodemodTest
tests each file with extension .java.before
in the
Metadata.testResourceDir()
test resource directory (including subdirectories) by
executing the Metadata.codemodType()
LLM-assisted codemod and verifying the changes.
If a file being tested is not paired with a .java.after
file, the test will verify
that the LLM-assisted codemod does not change the file.
If the CODEMODDER_OPENAI_API_KEY
environment variable is not set, the tests will be
disabled.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract String
If a codemod's changes don't exactly match the.java.after
file, the LLM will use these requirements to assess whether the changes are similar enough to pass the test.
-
Constructor Details
-
LLMAssistedCodemodTest
public LLMAssistedCodemodTest()
-
-
Method Details
-
getRequirementsPrompt
If a codemod's changes don't exactly match the.java.after
file, the LLM will use these requirements to assess whether the changes are similar enough to pass the test.
-