OR001: begin → chunk → end is processed in order; the resulting onCreateSurface callback observes the full envelope.
| 19 | // OR001: begin → chunk → end is processed in order; the resulting |
| 20 | // onCreateSurface callback observes the full envelope. |
| 21 | TEST(OrderingTest, OR001_BeginChunkEnd_OrderPreserved) { |
| 22 | ::agenui::testing::ScopedSurfaceManager sm; |
| 23 | ::agenui::testing::MockMessageListener listener; |
| 24 | sm->addSurfaceEventListener(&listener); |
| 25 | |
| 26 | auto json = ::agenui::testing::LoadFixtureOrEmpty( |
| 27 | "protocol/create_surface.json"); |
| 28 | ASSERT_FALSE(json.empty()); |
| 29 | sm->beginTextStream(); |
| 30 | sm->receiveTextChunk(json); |
| 31 | sm->endTextStream(); |
| 32 | EXPECT_TRUE(listener.waitFor( |
| 33 | [&]() { return !listener.createSurfaceCalls.empty(); }, 2000)); |
| 34 | |
| 35 | sm->removeSurfaceEventListener(&listener); |
| 36 | } |
| 37 | |
| 38 | // OR002: many small chunks are reassembled in order. |
| 39 | TEST(OrderingTest, OR002_ManySmallChunks_FIFOPreserved) { |
nothing calls this directly
no test coverage detected