diff mrjunejune/test/inference_bridge_test.c @ 261:b401627fc49e

Add JRPG mock flows and interactive previews Add scripted mock SSE commands, custom event forwarding, animated chat turns, full-height message navigation, and a cyberpunk resume dossier. Co-authored-by: Copilot <[email protected]>
author MrJuneJune <mrjunejune@users.noreply.github.com>
date Wed, 05 Aug 2026 20:38:32 -0700
parents 1f9877b637e9
children 056790c4fb0d
line wrap: on
line diff
--- a/mrjunejune/test/inference_bridge_test.c	Wed Aug 05 09:19:41 2026 -0700
+++ b/mrjunejune/test/inference_bridge_test.c	Wed Aug 05 20:38:32 2026 -0700
@@ -13,9 +13,11 @@
   int deltas;
   int completed;
   int usage;
+  int custom;
   int done;
   int closed;
   char delta[128];
+  char custom_json[256];
   int64 input_tokens;
   int64 output_tokens;
 } Test_State;
@@ -41,6 +43,15 @@
     p_state->input_tokens = p_event->input_tokens;
     p_state->output_tokens = p_event->output_tokens;
   }
+  else if (strcmp(p_event->type, "tool.started") == 0)
+  {
+    p_state->custom++;
+    snprintf(
+        p_state->custom_json,
+        sizeof(p_state->custom_json),
+        "%s",
+        p_event->raw_json);
+  }
   else if (strcmp(p_event->type, "turn.done") == 0 &&
            strncmp(p_event->request_id, "request-", 8) == 0)
   {
@@ -83,7 +94,9 @@
   assert(state.deltas == 1);
   assert(state.completed == 1);
   assert(state.usage == 1);
+  assert(state.custom == 1);
   assert(strcmp(state.delta, "hello \"traveler\"\\path") == 0);
+  assert(strstr(state.custom_json, "\"name\":\"mock-search\""));
   assert(state.input_tokens == 7);
   assert(state.output_tokens == 3);