ZJU-ACES-ISE / chatunitest-core

A framework to generate unit tests using LLMs
MIT License
21 stars 5 forks source link

Internal class and anonymous class name conflict issue #5

Open cube-dragon opened 2 hours ago

cube-dragon commented 2 hours ago
  1. Due to the current generation logic being designed to generate tests for individual methods and ultimately consolidate them into a single package, issues arise when there are test classes and enum classes with the same name.

  2. Some tests generated by the LLM not only use internal classes but also external classes with the same name, leading to confusion about which class should actually be used.

  3. The tests generated by the LLM attempt to throw an exception that will never be thrown. image

cube-dragon commented 2 hours ago

The first issue has been resolved, and the idea is to iterate through all tests after generation and add numbering to the names of internal and enumeration classes to prevent naming conflicts. I have created a branch to address this issue:issue1.