Core: registro de metadados de blocos (tb_meta) + testes; metadados declarados nas libraries

This commit is contained in:
mguinhos committed 2026-10-20 22:07:40 -03:00
1 parent 22ae18f508
commit 036162280d
14 files changed
+397 -2

No files matched your search

+12 -2
View File
@@ -67,7 +67,8 @@ SRCS := src/tinyblocks.c \
src/tb_renderable_block.c \
src/tb_stage.c \
src/tb_json_block.c \
src/tb_image.c
src/tb_image.c \
src/tb_meta.c
OBJS := $(patsubst src/%.c,$(BUILD)/%.o,$(SRCS))
OBJS_DBG := $(patsubst src/%.c,$(BUILD)/%-dbg.o,$(SRCS))
@@ -92,7 +93,7 @@ LIB_LDFLAGS := -L$(ED_DIR)/build -L$(GX_DIR)/build -L$(SD_DIR)/build \
.PHONY: all help debug release static shared example sdl2 clean run python-lib mcp-lib json \
editor run-editor run-sdl2 mylib vector customappearance graphics sdl2-backend test-editor \
appdir appimage run-appimage icon \
test-toml test-plugin test-blueprint test-base64 test-curves test-ppm test-bmp test-png test-image test-vg test-svg test-jpg \
test-toml test-plugin test-blueprint test-base64 test-curves test-meta test-ppm test-bmp test-png test-image test-vg test-svg test-jpg \
test-syntax test-regex test-markdown test-opentype \
category-libs category-sos libs \
lib-events lib-control lib-operators lib-variables lib-appearance lib-pen lib-fs \
@@ -494,6 +495,15 @@ $(BUILD)/base64_test: tests/base64_test.c $(B64_DIR)/src/tb_base64.c static
test-base64: $(BUILD)/base64_test ## Roda o teste da base64 (ASan/UBSan)
./$(BUILD)/base64_test
# -- Teste dos metadados de blocos (core tb_meta) ---
$(BUILD)/meta_test: tests/meta_test.c $(OP_DIR)/src/tb_operators.c static
@mkdir -p $(BUILD)
$(CC) $(CFLAGS_DBG) -I$(OP_DIR)/include $(OP_DIR)/src/tb_operators.c \
tests/meta_test.c -o $@ -Wl,--start-group $(LIB_A) -Wl,--end-group -lm
test-meta: $(BUILD)/meta_test ## Roda o teste dos metadados de blocos (ASan/UBSan)
./$(BUILD)/meta_test
# -- Teste da library curves ---
$(BUILD)/curves_test: tests/curves_test.c $(CV_DIR)/src/tb_curves.c static
@mkdir -p $(BUILD)