From 50a271cc241fb9fcdb196d45ba113f74cb318b47 Mon Sep 17 00:00:00 2001 From: eunhhu Date: Fri, 25 Sep 2026 13:31:28 +0100 Subject: Keep event faults out of view evaluation A view that failed (for example on a missing list item) overwrote the app's fault, so a host saw a fault after a successful event. A view now reports failure only by its result. --- prototypes/connections/test-module.c | 1 + 1 file changed, 1 insertion(+) (limited to 'prototypes/connections/test-module.c') diff --git a/prototypes/connections/test-module.c b/prototypes/connections/test-module.c index eb61521..8867e0a 100644 --- a/prototypes/connections/test-module.c +++ b/prototypes/connections/test-module.c @@ -916,6 +916,7 @@ static void lists(void) { double value; CHECK(number_view(&app, 0) == 0 && number_view(&app, 1) == 0 && !pure_app_view(&app, 2, &value)); CHECK(pure_app_view_text(&app, 3, text_span, &(Text){{0}, 0}) == PURE_NOT_FOUND); /* no item yet */ + CHECK(app.fault == PURE_FAULT_NONE); /* views leave faults alone */ CHECK(pure_app_text(&app, 0, (PureSpan){(const unsigned char *)"a", 1}) == PURE_OK); CHECK(pure_app_text(&app, 0, (PureSpan){(const unsigned char *)"b", 1}) == PURE_OK); CHECK(pure_list_count(app.lists[1]) == 2 && app.values[2] == 1 && app.values[0] == 2); -- cgit v1.2.3