07252c0172
Nuevo modulo reutilizable terminal_panel (fn_term) para ImGui: Sub-fn ansi_parser_cpp_core (cpp/functions/core/): - Parser ANSI/VT100 byte-a-byte sin heap allocs por evento - SGR colores FG/BG 16-color + bold + reset - Cursor moves CUU/CUD/CUF/CUB + CUP absoluto - Erase ED(2)/EL(2), CR/LF/BS - Statemachine 4 estados, thread-unsafe por diseno - 21 tests unitarios (57 assertions), todos pasan terminal_panel_cpp_viz (cpp/functions/viz/terminal_panel/): - terminal_panel.cpp: render ImGui + process_output con list clipper - terminal_panel_linux.cpp: forkpty + reader thread no-blocking - terminal_panel_windows.cpp: ConPTY CreatePseudoConsole (SDK >= 17763) - Scrollback circular configurable (default 5000 lineas) - Toolbar: clear, copy, reset, scroll-lock + status indicator - readonly mode: sin input box, send() es no-op - uses_functions: ansi_parser_cpp_core, logger_cpp_core Tests: - test_ansi_parser.cpp: 21 test cases, 57 assertions (PASS) - test_terminal_panel_smoke.cpp: 3 test cases (PASS: spawn echo hello, process exits cleanly, readonly ignores send) CMake: - cpp/tests/CMakeLists.txt: add test_ansi_parser + test_terminal_panel_smoke - primitives_gallery (sub-repo): ver commit separado en apps/primitives_gallery Pendiente (anti-scope v1): - Windows ConPTY: stub funcional que compila; join() del reader thread via std::thread no implementado (usa CreateThread detached) - ANSI 256/24-bit color, italics, Unicode wide - Curses pesados (vim, htop, top) — cursor visible basic solo Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
336 lines
18 KiB
CMake
336 lines
18 KiB
CMake
# cpp/tests — Catch2 unit tests for primitives.
|
|
#
|
|
# Catch2 amalgamated is compiled once as a STATIC LIB. Each test binary is
|
|
# its own executable so we can mix tests that use ImGui-context and tests
|
|
# that are pure logic without polluting symbols.
|
|
|
|
add_library(catch2 STATIC
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../vendor/catch2/catch_amalgamated.cpp)
|
|
target_include_directories(catch2 PUBLIC
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../vendor/catch2)
|
|
target_compile_features(catch2 PUBLIC cxx_std_17)
|
|
|
|
# Helper: register a test executable.
|
|
# add_fn_test(<name> <sources...>)
|
|
# By default links Catch2 + the cpp/functions include path. Tests that need
|
|
# real symbols (linking against fn_framework etc.) can call
|
|
# target_link_libraries(${name} PRIVATE fn_framework imgui ...) afterwards.
|
|
function(add_fn_test name)
|
|
add_executable(${name} ${ARGN})
|
|
target_link_libraries(${name} PRIVATE catch2)
|
|
target_include_directories(${name} PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../framework)
|
|
add_test(NAME ${name} COMMAND ${name})
|
|
endfunction()
|
|
|
|
# --- Tests reales (logica pura, no necesitan ImGui context) ----------------
|
|
add_fn_test(test_tween_curves test_tween_curves.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/tween_curves.cpp)
|
|
add_fn_test(test_pie_chart_math test_pie_chart_math.cpp)
|
|
add_fn_test(test_kpi_card_math test_kpi_card_math.cpp)
|
|
add_fn_test(test_bar_chart_math test_bar_chart_math.cpp)
|
|
|
|
# Issue 0081-F — auto_detect_type y compute_column_stats (extraidos del playground tables).
|
|
add_fn_test(test_auto_detect_type test_auto_detect_type.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/auto_detect_type.cpp)
|
|
add_fn_test(test_compute_column_stats test_compute_column_stats.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/auto_detect_type.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/compute_column_stats.cpp)
|
|
|
|
# Issue 0045 — tests de la logica pura extraida.
|
|
add_fn_test(test_sql_parse test_sql_parse.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/sql_parse.cpp)
|
|
add_fn_test(test_process_state_machine test_process_state_machine.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/process_state_machine.cpp)
|
|
add_fn_test(test_file_poll_diff test_file_poll_diff.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/file_poll_diff.cpp)
|
|
|
|
# --- Placeholders para primitivos UI (logica visual cubierta en 0048) ------
|
|
add_fn_test(test_tokens test_tokens.cpp)
|
|
add_fn_test(test_button test_button.cpp)
|
|
add_fn_test(test_select test_select.cpp)
|
|
add_fn_test(test_text_input test_text_input.cpp)
|
|
add_fn_test(test_badge test_badge.cpp)
|
|
add_fn_test(test_kpi_card test_kpi_card.cpp)
|
|
add_fn_test(test_pie_chart test_pie_chart.cpp)
|
|
add_fn_test(test_bar_chart test_bar_chart.cpp)
|
|
add_fn_test(test_tree_view test_tree_view.cpp)
|
|
add_fn_test(test_modal_dialog test_modal_dialog.cpp)
|
|
add_fn_test(test_toolbar test_toolbar.cpp)
|
|
add_fn_test(test_toast test_toast.cpp)
|
|
add_fn_test(test_empty_state test_empty_state.cpp)
|
|
add_fn_test(test_page_header test_page_header.cpp)
|
|
add_fn_test(test_dashboard_panel test_dashboard_panel.cpp)
|
|
add_fn_test(test_dashboard_grid test_dashboard_grid.cpp)
|
|
add_fn_test(test_sparkline test_sparkline.cpp)
|
|
add_fn_test(test_table_view test_table_view.cpp)
|
|
add_fn_test(test_icon_button test_icon_button.cpp)
|
|
|
|
# --- Issue 0049c — graph renderer Tier 1 (RGBA8 + auto-pause helper) -------
|
|
add_fn_test(test_graph_pack_rgba8 test_graph_pack_rgba8.cpp)
|
|
add_fn_test(test_graph_should_pause test_graph_should_pause.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/viz/graph_force_layout.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/viz/graph_layouts.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/viz/graph_types.cpp)
|
|
|
|
# --- Issue 0049d — vertex pulling edge buffer (logica solo, sin GL) --------
|
|
add_fn_test(test_graph_edge_static test_graph_edge_static.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/viz/graph_types.cpp)
|
|
|
|
# --- Issue 0049e — modelo de grafo extendido (GraphNode/GraphEdge + tipos) --
|
|
add_fn_test(test_graph_types test_graph_types.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/viz/graph_types.cpp)
|
|
|
|
# --- Issue 0049g — graph_sources: lector de operations.db ------------------
|
|
add_fn_test(test_graph_sources test_graph_sources.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/viz/graph_sources.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/viz/graph_types.cpp)
|
|
target_link_libraries(test_graph_sources PRIVATE SQLite::SQLite3)
|
|
|
|
# --- Issue 0049i — graph_layouts (radial / hierarchical / fixed / etc) -----
|
|
add_fn_test(test_graph_layouts test_graph_layouts.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/viz/graph_layouts.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/viz/graph_types.cpp)
|
|
|
|
# --- Issue 0049j — graph_labels (LabelPolicy + select pure logic) ---------
|
|
add_fn_test(test_graph_labels test_graph_labels.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/viz/graph_labels_select.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/viz/graph_types.cpp)
|
|
|
|
# --- Issue 0049i — graph_viewport selection helpers (logica pura sin GL) ---
|
|
# Solo cubre graph_viewport_selection.cpp; el widget completo se prueba en
|
|
# primitives_gallery + golden image diff. graph_viewport.h incluye ImVec2,
|
|
# por eso anadimos cpp/vendor/imgui al include path.
|
|
add_fn_test(test_graph_viewport test_graph_viewport.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/viz/graph_viewport_selection.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/viz/graph_types.cpp)
|
|
target_include_directories(test_graph_viewport PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../vendor/imgui)
|
|
|
|
# --- Issue 0049h — graph_force_layout_gpu (compute + spatial hash) ----------
|
|
# El test crea una ventana GLFW oculta a 4.3 core; si glfwInit/window/context
|
|
# fallan (CI sin DISPLAY, Mesa sin compute), el test SKIPea. Linkamos contra
|
|
# glfw + OpenGL para que se resuelvan los simbolos en cualquier caso.
|
|
add_fn_test(test_graph_force_layout_gpu test_graph_force_layout_gpu.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/viz/graph_force_layout_gpu.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/viz/graph_force_layout.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/viz/graph_layouts.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/viz/graph_types.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/gfx/gl_loader.cpp)
|
|
if(WIN32)
|
|
target_link_libraries(test_graph_force_layout_gpu PRIVATE glfw opengl32)
|
|
else()
|
|
find_package(OpenGL REQUIRED)
|
|
target_link_libraries(test_graph_force_layout_gpu PRIVATE glfw OpenGL::GL)
|
|
endif()
|
|
|
|
# --- Issue 0049f — atlas de iconos Tabler para graph_renderer ---------------
|
|
# graph_icons.cpp incluye gl_loader.h y referencia gl* — el atlas se puede
|
|
# construir sin contexto via FN_GRAPH_ICONS_SKIP_GL=1 (set por el test), pero
|
|
# las funciones GL siguen siendo simbolos a resolver en link. Linkamos contra
|
|
# OpenGL::GL (Linux) u opengl32 (Win cross) para que el linker quede contento.
|
|
add_fn_test(test_graph_icons test_graph_icons.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/viz/graph_icons.cpp)
|
|
target_include_directories(test_graph_icons PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../vendor/imgui)
|
|
target_compile_definitions(test_graph_icons PRIVATE
|
|
FN_CPP_ROOT="${CMAKE_CURRENT_SOURCE_DIR}/..")
|
|
if(WIN32)
|
|
target_link_libraries(test_graph_icons PRIVATE opengl32)
|
|
else()
|
|
find_package(OpenGL REQUIRED)
|
|
target_link_libraries(test_graph_icons PRIVATE OpenGL::GL)
|
|
endif()
|
|
|
|
# --- Issue 0081-B — compute_stage + compute_pipeline (TQL pure logic) -------
|
|
# tql_helpers.cpp added (issue 0081-I): compute_stage.cpp now delegates
|
|
# aggregation_alias to tql_helpers to avoid ODR conflict in fn_module_data_table lib.
|
|
add_fn_test(test_compute_stage test_compute_stage.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/compute_stage.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/tql_helpers.cpp)
|
|
add_fn_test(test_compute_pipeline test_compute_pipeline.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/compute_stage.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/compute_pipeline.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/tql_helpers.cpp)
|
|
|
|
# --- Issue 0081-E — join_tables: pure multi-key hash join --------------------
|
|
add_fn_test(test_join_tables test_join_tables.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/join_tables.cpp)
|
|
|
|
# --- Issue 0081-G — viz_render: dispatcher ImPlot sobre StageOutput ---------
|
|
# viz_render.cpp incluye imgui.h e implot.h y linkea contra ambas librerias.
|
|
# El test NO inicializa GL ni contexto ImGui — solo ejercita las funciones
|
|
# helper publicas (first_numeric_col, first_category_col, extract_numeric,
|
|
# extract_category) que son logica pura sobre StageOutput.
|
|
# render() requiere ImPlot context vivo: smoke real via primitives_gallery.
|
|
add_fn_test(test_viz_render test_viz_render.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/viz/viz_render.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/auto_detect_type.cpp)
|
|
target_include_directories(test_viz_render PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../vendor/imgui
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../vendor/implot)
|
|
target_link_libraries(test_viz_render PRIVATE imgui implot)
|
|
|
|
# --- lua_engine: motor Lua 5.4 sandbox (issue 0081-D) ----------------------
|
|
# lua_engine.cpp incluye lua.h/lualib.h/lauxlib.h — requiere linkar lua54.
|
|
# data_table_types.h esta en functions/core/ (ya en el include path de add_fn_test).
|
|
add_fn_test(test_lua_engine test_lua_engine.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/lua_engine.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/auto_detect_type.cpp)
|
|
target_link_libraries(test_lua_engine PRIVATE lua54)
|
|
|
|
# --- layout_storage: persistencia de last_active (restore-on-open) ---------
|
|
# layout_storage.cpp incluye <imgui.h> y referencia ImGui::Save/LoadIniSettings*,
|
|
# por eso necesitamos linkar contra imgui (compilado en el target del root
|
|
# CMakeLists). El test no abre ventanas ni inicializa GL — solo ejercita el
|
|
# meta-table y los callbacks que NO requieren un ImGui context vivo.
|
|
add_fn_test(test_layout_storage test_layout_storage.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/layout_storage.cpp)
|
|
target_link_libraries(test_layout_storage PRIVATE SQLite::SQLite3 imgui)
|
|
|
|
# --- Issue 0081-C — tql_emit + tql_apply (TQL round-trip, pure) ------------
|
|
# tql_helpers.cpp: pure token converters (no Lua, no ImGui).
|
|
# tql_emit.cpp: State -> Lua text (no Lua runtime needed).
|
|
# tql_apply.cpp: Lua text -> State (uses Lua 5.4 C API directly, not lua_engine).
|
|
# Both tests use their own main() (no Catch2) matching fn run dispatch.
|
|
add_executable(tql_emit_test
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/tql_emit_test.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/tql_emit.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/tql_helpers.cpp)
|
|
target_include_directories(tql_emit_test PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../framework)
|
|
add_test(NAME tql_emit_test COMMAND tql_emit_test)
|
|
|
|
add_executable(tql_apply_test
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/tql_apply_test.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/tql_apply.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/tql_emit.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/tql_helpers.cpp)
|
|
target_include_directories(tql_apply_test PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../framework)
|
|
target_link_libraries(tql_apply_test PRIVATE lua54)
|
|
add_test(NAME tql_apply_test COMMAND tql_apply_test)
|
|
|
|
# --- Issue 0081-I — fn_module_data_table static lib smoke test ---------------------
|
|
# Linker test: verifies that all 9 registry .cpp files in fn_module_data_table resolve
|
|
# symbols correctly when linked as a static lib. Does NOT call data_table::render
|
|
# (requires ImGui context + playground headers). Uses its own main().
|
|
if(TARGET fn_module_data_table)
|
|
add_executable(test_fn_table_viz_smoke
|
|
${CMAKE_CURRENT_SOURCE_DIR}/test_fn_table_viz_smoke.cpp)
|
|
target_include_directories(test_fn_table_viz_smoke PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../vendor/imgui
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../vendor/implot)
|
|
target_link_libraries(test_fn_table_viz_smoke PRIVATE fn_module_data_table)
|
|
add_test(NAME test_fn_table_viz_smoke COMMAND test_fn_table_viz_smoke)
|
|
endif()
|
|
|
|
# --- Issue 0081-N — declarative CellRenderer (Badge/Progress/Duration/Icon) --
|
|
# Smoke + back-compat tests for TableInput.column_specs (v1.1.0).
|
|
# Verifies type construction + link resolution; does NOT call render() (ImGui).
|
|
if(TARGET fn_module_data_table)
|
|
add_executable(test_column_specs
|
|
${CMAKE_CURRENT_SOURCE_DIR}/test_column_specs.cpp)
|
|
target_include_directories(test_column_specs PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../vendor/imgui
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../vendor/implot)
|
|
target_link_libraries(test_column_specs PRIVATE fn_module_data_table)
|
|
add_test(NAME test_column_specs COMMAND test_column_specs)
|
|
endif()
|
|
|
|
# --- Issue 0081 — tql_to_sql: pure TQL State -> SQL DuckDB emitter ----------
|
|
# Pure logic: no DuckDB linked, no ImGui. Only data_table_types.h + tql_helpers.
|
|
add_fn_test(test_tql_to_sql test_tql_to_sql.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/tql_to_sql.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/tql_helpers.cpp)
|
|
|
|
# --- Issue 0081 — llm_anthropic: Anthropic API client pure helpers ----------
|
|
# Only tests pure functions (build_request_body, extract_code_block,
|
|
# parse_response_text) + call_api via FN_LLM_MOCK_RESPONSE injection.
|
|
# Real HTTP roundtrip requires a valid API key (manual_test).
|
|
add_fn_test(test_llm_anthropic test_llm_anthropic.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/llm_anthropic.cpp)
|
|
|
|
# --- Issue 0109a — parse_md_frontmatter: pure YAML-subset frontmatter parser --
|
|
add_fn_test(test_parse_md_frontmatter test_parse_md_frontmatter.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/parse_md_frontmatter.cpp)
|
|
target_compile_definitions(test_parse_md_frontmatter PRIVATE
|
|
FN_TEST_REPO_ROOT="${CMAKE_CURRENT_SOURCE_DIR}/../..")
|
|
|
|
# --- Issue 0109b — compute_ring_layout: geometria pura para skill_tree -------
|
|
add_fn_test(test_compute_ring_layout test_compute_ring_layout.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/compute_ring_layout.cpp)
|
|
|
|
# --- Issue 0110 — http_request: generic cURL-popen client -------------------
|
|
# Integration test: fork+execs python3 -m http.server fixture in the test
|
|
# process. Skips gracefully if python3 isn't available (server().pid == 0).
|
|
add_fn_test(test_http_request test_http_request.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/http_request.cpp)
|
|
|
|
# --- Issue 0110 — http_get_json: nlohmann::json wrapper over http_request ---
|
|
add_fn_test(test_http_get_json test_http_get_json.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/http_request.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/http_get_json.cpp)
|
|
target_include_directories(test_http_get_json PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../vendor)
|
|
|
|
# --- Visual golden-image diff (issue 0048) ---------------------------------
|
|
# El binario primitives_gallery se compila con --capture; el test compara los
|
|
# PNGs generados con los goldens en cpp/tests/golden/. Si no hay goldens o el
|
|
# entorno no tiene GL, el test SKIPea.
|
|
add_fn_test(test_visual
|
|
test_visual.cpp
|
|
png_diff.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../vendor/stb/stb_image_impl.cpp)
|
|
target_include_directories(test_visual PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../vendor/stb)
|
|
target_compile_definitions(test_visual PRIVATE
|
|
"FN_TEST_GOLDEN_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}/golden\""
|
|
"FN_TEST_GALLERY_BIN=\"$<TARGET_FILE:primitives_gallery>\""
|
|
"FN_TEST_TMP_DIR=\"${CMAKE_BINARY_DIR}/tests/visual_actual\""
|
|
# CMAKE_SOURCE_DIR aqui es cpp/, queremos la raiz del repo (un nivel arriba).
|
|
"FN_TEST_REPO_ROOT=\"${CMAKE_SOURCE_DIR}/..\"")
|
|
# Asegura que primitives_gallery existe antes de correr el test.
|
|
add_dependencies(test_visual primitives_gallery)
|
|
|
|
# --- Issue 0117 — dod_evidence_panel helpers: logica pura para panel DoD ----
|
|
# Solo helpers (count_status, find_evidence, status_icon_id, status_color_token).
|
|
# El render con ImGui (dod_evidence_panel.cpp) NO se compila aqui: requiere
|
|
# imgui + tokens + icons_tabler — cubierto en builds de apps consumidoras.
|
|
add_fn_test(test_dod_evidence_panel test_dod_evidence_panel.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/viz/dod_evidence_panel_helpers.cpp)
|
|
|
|
# --- Issue 0118 — agent_runs_timeline: helpers puros ----------
|
|
add_fn_test(test_agent_runs_timeline test_agent_runs_timeline.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/viz/agent_runs_timeline_helpers.cpp)
|
|
|
|
# --- sse_client: SSE client C++ (registry function) ----
|
|
# Integration test: forks a minimal Python SSE server fixture.
|
|
# Uses http_request for the /health readiness probe.
|
|
# Skips gracefully if python3 is not available.
|
|
add_fn_test(test_sse_client test_sse_client.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/sse_client.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/http_request.cpp)
|
|
|
|
# --- Issue 0132 — ansi_parser: logica pura, sin ImGui ---
|
|
add_fn_test(test_ansi_parser test_ansi_parser.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/ansi_parser.cpp)
|
|
|
|
# --- Issue 0132 — terminal_panel smoke: spawn real PTY (Linux only) ---
|
|
# En Windows: todos los casos se skipean via SKIP(). En Linux necesita -lutil.
|
|
# Linkamos fn_framework para obtener logger.cpp (fn_log) + imgui + implot.
|
|
add_fn_test(test_terminal_panel_smoke test_terminal_panel_smoke.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/core/ansi_parser.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/viz/terminal_panel/terminal_panel.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/viz/terminal_panel/terminal_panel_linux.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../functions/viz/terminal_panel/terminal_panel_windows.cpp)
|
|
target_link_libraries(test_terminal_panel_smoke PRIVATE fn_framework)
|
|
if(NOT WIN32)
|
|
target_link_libraries(test_terminal_panel_smoke PRIVATE util)
|
|
endif()
|