diff --git a/Makefile b/Makefile index d56659edf1d41..11b31c5c84182 100644 --- a/Makefile +++ b/Makefile @@ -918,7 +918,7 @@ tests/test-grammar-parser: tests/test-grammar-parser.cpp ggml.o llama.o grammar- $(CXX) $(CXXFLAGS) -c $< -o $(call GET_OBJ_FILE, $<) $(CXX) $(CXXFLAGS) $(filter-out %.h $<,$^) $(call GET_OBJ_FILE, $<) -o $@ $(LDFLAGS) -tests/test-grammar-integration: tests/test-grammar-integration.cpp ggml.o grammar-parser.o $(OBJS) +tests/test-grammar-integration: tests/test-grammar-integration.cpp ggml.o llama.o grammar-parser.o $(OBJS) $(CXX) $(CXXFLAGS) -c $< -o $(call GET_OBJ_FILE, $<) $(CXX) $(CXXFLAGS) $(filter-out %.h $<,$^) $(call GET_OBJ_FILE, $<) -o $@ $(LDFLAGS) diff --git a/tests/test-grammar-integration.cpp b/tests/test-grammar-integration.cpp index 1a4ada9d42dad..a9998c128e8c4 100644 --- a/tests/test-grammar-integration.cpp +++ b/tests/test-grammar-integration.cpp @@ -2,8 +2,12 @@ #undef NDEBUG #endif -#include "llama.cpp" // TODO: not great +#define LLAMA_API_INTERNAL + +#include "ggml.h" +#include "llama.h" #include "grammar-parser.h" +#include "unicode.h" #include #include @@ -30,7 +34,7 @@ expr ::= term ("+" term)* term ::= numero number ::= [0-9]+)"""; - fprintf(stderr, "NOTE: Error message (\"error parsing grammar\") expected on following line during successful test:\n"); + fprintf(stderr, "NOTE: Error message (\"parse: error parsing grammar: Undefined rule identifier 'numero'\") expected on following line during successful test:\n"); grammar_parser::parse_state parsed_grammar = grammar_parser::parse(grammar_str.c_str());