From 59c899daace09a3b7dfa96ca22820863a2a1d960 Mon Sep 17 00:00:00 2001 From: ochafik Date: Tue, 12 Mar 2024 04:32:24 +0000 Subject: [PATCH] json: dirty include for test --- Makefile | 2 +- tests/test-json-schema-to-grammar.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c9ec08564..08a7824c9 100644 --- a/Makefile +++ b/Makefile @@ -850,7 +850,7 @@ tests/test-double-float: tests/test-double-float.cpp ggml.o $(OBJS) $(CXX) $(CXXFLAGS) -c $< -o $(call GET_OBJ_FILE, $<) $(CXX) $(CXXFLAGS) $(filter-out %.h $<,$^) $(call GET_OBJ_FILE, $<) -o $@ $(LDFLAGS) -tests/test-json-schema-to-grammar: tests/test-json-schema-to-grammar.cpp json-schema-to-grammar.o +tests/test-json-schema-to-grammar: tests/test-json-schema-to-grammar.cpp $(CXX) $(CXXFLAGS) -c $< -o $(call GET_OBJ_FILE, $<) $(CXX) $(CXXFLAGS) $(filter-out %.h $<,$^) $(call GET_OBJ_FILE, $<) -o $@ $(LDFLAGS) diff --git a/tests/test-json-schema-to-grammar.cpp b/tests/test-json-schema-to-grammar.cpp index 882ae0954..abfc184ec 100755 --- a/tests/test-json-schema-to-grammar.cpp +++ b/tests/test-json-schema-to-grammar.cpp @@ -2,12 +2,15 @@ #undef NDEBUG #endif -#include "../examples/server/json-schema-to-grammar.h" #include #include #include #include +// TODO: split this to some library? common would need json.hpp +#include "../examples/server/json-schema-to-grammar.h" +#include "../examples/server/json-schema-to-grammar.cpp" + using namespace std; string INPUT_NAME(tmpnam(nullptr));