feat(registry): index cpp/apps/* + e2e test infrastructure
registry/indexer.go ahora escanea <lang>/apps/*/app.md ademas de apps/ y projects/*/apps/. cpp/apps/chart_demo y cpp/apps/shaders_lab pasan a estar en registry.db con sus manifests. Infraestructura de tests e2e (opt-in con -DFN_BUILD_TESTS=ON): - vendor de Dear ImGui Test Engine (personal/open-source license). - chart_demo_tests target con tests/chart_demo_tests.cpp. - /e2e-cpp slash command para crear y ejecutar tests e2e. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include "viz/bar_chart.h"
|
||||
#include "viz/heatmap.h"
|
||||
#include "core/app_menubar.h"
|
||||
#include "core/logger.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <vector>
|
||||
@@ -23,6 +24,7 @@ static bool data_initialized = false;
|
||||
|
||||
static void init_data() {
|
||||
if (data_initialized) return;
|
||||
fn_log::log_info("init_data: generando %d puntos sin/cos, 200 scatter, 10x10 heatmap", N);
|
||||
for (int i = 0; i < N; i++) {
|
||||
xs[i] = static_cast<float>(i) * 0.02f;
|
||||
ys_sin[i] = sinf(xs[i]);
|
||||
@@ -37,9 +39,10 @@ static void init_data() {
|
||||
heat_data[i] = sinf(r * 0.5f) * cosf(c * 0.5f);
|
||||
}
|
||||
data_initialized = true;
|
||||
fn_log::log_debug("init_data: ok");
|
||||
}
|
||||
|
||||
static void render() {
|
||||
void render() {
|
||||
init_data();
|
||||
|
||||
// MainMenuBar (solo Settings — chart_demo no tiene paneles toggleables)
|
||||
@@ -76,6 +79,7 @@ static void render() {
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
#ifndef FN_TEST_BUILD
|
||||
int main() {
|
||||
return fn::run_app({
|
||||
.title = "fn_registry — Chart Demo",
|
||||
@@ -83,6 +87,9 @@ int main() {
|
||||
.height = 900,
|
||||
.about = {.name = "chart demo",
|
||||
.version = "0.2.0",
|
||||
.description = "Demo de primitivos viz: line, scatter, bar, heatmap. AppConfig estandar + multi-viewport."}
|
||||
.description = "Demo de primitivos viz: line, scatter, bar, heatmap. AppConfig estandar + multi-viewport."},
|
||||
.log = {.file_path = "chart_demo.log",
|
||||
.level = static_cast<int>(fn_log::Level::Debug)}
|
||||
}, render);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user