Skip to content

Commit c42510a

Browse files
committed
Unit test added
1 parent f220975 commit c42510a

2 files changed

Lines changed: 443 additions & 1 deletion

File tree

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,11 @@ $(BUILD_DIR)/%.o: %.c
128128
test: $(TARGET)
129129
$(SQLITE3) ":memory:" -cmd ".bail on" ".load ./dist/vector" "SELECT vector_version();"
130130

131+
TEST_SRC = test/test_vector.c libs/sqlite3.c $(SRC_FILES)
132+
unittest:
133+
$(CC) $(CFLAGS) -DSQLITE_CORE -O2 $(TEST_SRC) -o $(BUILD_DIR)/test_vector -lm -lpthread
134+
./$(BUILD_DIR)/test_vector
135+
131136
# Clean up generated files
132137
clean:
133138
rm -rf $(BUILD_DIR)/* $(DIST_DIR)/* *.gcda *.gcno *.gcov *.sqlite
@@ -229,4 +234,4 @@ help:
229234
@echo " xcframework - Build the Apple XCFramework"
230235
@echo " aar - Build the Android AAR package"
231236

232-
.PHONY: all clean test extension help version xcframework aar
237+
.PHONY: all clean test unittest extension help version xcframework aar

0 commit comments

Comments
 (0)