diff options
| author | eunhhu <[email protected]> | 2026-09-25 13:31:28 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-09-25 13:31:28 +0100 |
| commit | 50a271cc241fb9fcdb196d45ba113f74cb318b47 (patch) | |
| tree | cc7da2a15a39906341f5ed22eadd12b2ad629983 /prototypes/connections/test-module.c | |
| parent | e22b6f5c51e9133495c632a0c80674c14083c382 (diff) | |
| download | pure-50a271cc241fb9fcdb196d45ba113f74cb318b47.tar.gz pure-50a271cc241fb9fcdb196d45ba113f74cb318b47.zip | |
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.
Diffstat (limited to 'prototypes/connections/test-module.c')
| -rw-r--r-- | prototypes/connections/test-module.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); |
