FastLED 3.9.15
Loading...
Searching...
No Matches

◆ update()

void LoopbackTestRunner::update ( )
inline

Definition at line 62 of file LoopbackTestRunner.h.

62 {
63 // State machine advances through RUNNING -> WAITING -> RUNNING transitions
64 // Callbacks (in runTest) handle WAITING -> RUNNING_NEXT transitions
65 switch (state) {
67 runTest("GET /", "http://localhost:8080/",
68 "Hello from loopback test!\n", RUNNING_GET_PING);
69 break;
70
72 runTest("GET /ping", "http://localhost:8080/ping",
73 "pong\n", RUNNING_GET_TEST);
74 break;
75
77 runTest("GET /test", "http://localhost:8080/test",
78 "test response\n", COMPLETED);
79 break;
80
81 case COMPLETED:
83 // Print summary
84 Serial.println();
85 Serial.println("======================");
86 Serial.print("Test Results: ");
87 Serial.print(tests_passed);
88 Serial.print("/");
89 Serial.print(tests_run);
90 Serial.println(" passed");
91 Serial.println("======================");
92
94 if (success) {
95 Serial.println("✓ All loopback tests PASSED");
96 } else {
97 Serial.println("✗ Loopback tests FAILED");
98 }
99
100 // Invoke user callback with results
102 callback_invoked = true;
103 }
104 state = IDLE;
105 break;
106
107 default:
108 // WAITING states or IDLE - nothing to do
109 break;
110 }
111 }
CompletionCallback completion_callback
void runTest(const char *name, const char *url, const char *expected, TestSequenceState next_state)
TestSequenceState state
#define Serial
Definition serial.h:304

References callback_invoked, COMPLETED, completion_callback, has_failure, IDLE, RUNNING_GET_PING, RUNNING_GET_ROOT, RUNNING_GET_TEST, runTest(), Serial, state, tests_passed, and tests_run.

+ Here is the call graph for this function: