tests : add a C compliance test
This commit is contained in:
parent
103cfafc77
commit
39ace3668c
3 changed files with 11 additions and 0 deletions
3
Makefile
3
Makefile
|
@ -468,3 +468,6 @@ tests/test-sampling: tests/test-sampling.cpp build-info.h ggml.o llama.o common.
|
|||
|
||||
tests/test-tokenizer-0: tests/test-tokenizer-0.cpp build-info.h ggml.o llama.o common.o $(OBJS)
|
||||
$(CXX) $(CXXFLAGS) $(filter-out %.txt,$^) -o $@ $(LDFLAGS)
|
||||
|
||||
tests/test-c.o: tests/test-c.c llama.h
|
||||
$(CC) $(CFLAGS) -c $(filter-out %.h,$^) -o $@
|
||||
|
|
|
@ -37,3 +37,8 @@ llama_build_and_test_executable(test-grammar-parser.cpp)
|
|||
llama_build_and_test_executable(test-llama-grammar.cpp)
|
||||
llama_build_and_test_executable(test-grad0.cpp) # SLOW
|
||||
# llama_build_and_test_executable(test-opt.cpp) # SLOW
|
||||
|
||||
# dummy executable - not installed
|
||||
get_filename_component(TEST_TARGET test-c.c NAME_WE)
|
||||
add_executable(${TEST_TARGET} test-c.c)
|
||||
target_link_libraries(${TEST_TARGET} PRIVATE llama)
|
||||
|
|
3
tests/test-c.c
Normal file
3
tests/test-c.c
Normal file
|
@ -0,0 +1,3 @@
|
|||
#include "llama.h"
|
||||
|
||||
int main(void) {}
|
Loading…
Add table
Add a link
Reference in a new issue