wasm-micro-runtime
wasm-micro-runtime copied to clipboard
[UNIT]test: add unit test cases for interpreter to improve coverage
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/interpretermodule - Improve
iwasm/interpretercoverage:- 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.
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
IMO, ideally, for a function, there should be one positive case, one negative case, and one corner case for testing.
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