wasm-micro-runtime icon indicating copy to clipboard operation
wasm-micro-runtime copied to clipboard

[UNIT]test: add unit test cases for interpreter to improve coverage

Open kylo5aby opened this issue 2 months ago • 3 comments

Summary

To quickly improve WAMR's software quality, this PR uses LLM to generate unit test cases for the interpreter module.

Changes

  • Add 15 new unit test cases for iwasm/interpreter module
  • Improve iwasm/interpreter coverage:
    • Lines coverage: 33.7% → 35.0% (+1.3%)
    • Functions coverage: 55.4% → 56.2% (+0.8%)

Testing

All new test cases pass successfully.

Welcome any feedback or suggestions on these AI-generated test cases. Please let me know if you have ideas for improvement.

kylo5aby avatar Nov 21 '25 10:11 kylo5aby

The file and directory structure should be organized as follows:

unit
├── CMakeLists.txt              -> add_subdirectory(smart-cases)
└── smart-cases
    ├── CMakeLists.txt          -> add_subdirectory(interpreter)
    └── interpreter
        ├── CMakeLists.txt
        └── wasm-apps

lum1n0us avatar Dec 04 '25 04:12 lum1n0us

IMO, ideally, for a function, there should be one positive case, one negative case, and one corner case for testing.

lum1n0us avatar Dec 04 '25 05:12 lum1n0us

The file and directory structure should be organized as follows:

unit
├── CMakeLists.txt              -> add_subdirectory(smart-cases)
└── smart-cases
    ├── CMakeLists.txt          -> add_subdirectory(interpreter)
    └── interpreter
        ├── CMakeLists.txt
        └── wasm-apps

resolved

kylo5aby avatar Dec 09 '25 06:12 kylo5aby