Skip to content

Commit 489c2ba

Browse files
test: add comprehensive unit tests for core modules
- Add tests for llama-cparams, llama-impl, llama-io, llama-adapter - Add tests for memory management (hybrid, recurrent, kv-cache-iswa) - Add tests for model-saver, quantization, and get-model utilities - Expand test-arg-parser with boundary conditions and error handling - Update CMakeLists.txt to include all new test targets - Achieve significant coverage improvements on critical modules Co-Authored-By: Jaime Mizrachi <[email protected]>
1 parent 1fdf0cc commit 489c2ba

13 files changed

+4716
-0
lines changed

tests/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,17 @@ endif ()
140140

141141
if (NOT WIN32 OR NOT BUILD_SHARED_LIBS)
142142
# these tests are disabled on Windows because they use internal functions not exported with LLAMA_API (when building with shared libraries)
143+
llama_build_and_test(test-adapter.cpp)
144+
llama_build_and_test(test-cparams.cpp)
145+
llama_build_and_test(test-impl.cpp)
146+
llama_build_and_test(test-io.cpp)
147+
llama_build_and_test(test-kv-cache-iswa.cpp)
148+
llama_build_and_test(test-kv-cache-iswa-simple.cpp)
149+
llama_build_and_test(test-memory-hybrid.cpp)
150+
llama_build_and_test(test-memory-recurrent.cpp)
151+
llama_build_and_test(test-model-saver.cpp)
152+
llama_build_and_test(test-quant.cpp)
153+
llama_build_and_test(test-get-model.cpp)
143154
llama_build_and_test(test-sampling.cpp)
144155
llama_build_and_test(test-grammar-parser.cpp)
145156
llama_build_and_test(test-grammar-integration.cpp)

0 commit comments

Comments
 (0)