summaryrefslogtreecommitdiff
path: root/tests/correctness_probe.c
diff options
context:
space:
mode:
authorBerke Güzel <wenekar1@gmail.com>2026-10-15 12:39:21 +0300
committerBerke Güzel <wenekar1@gmail.com>2026-10-15 12:39:21 +0300
commitca69844a243a6e335b0ddafad057f35e89e0a576 (patch)
tree7192c9f05e6500bb2ba550ca976ed9951b87c1f4 /tests/correctness_probe.c
parent22345caf457e8d9a4bdb56b696cc5f3694812276 (diff)
parent4c72f7b02fbafd15d0cf843edece106714bcc5f7 (diff)
Merge branch 'wt/snapshot-atomic' into api-hardening
# Conflicts: # src/snapshot.c
Diffstat (limited to 'tests/correctness_probe.c')
-rw-r--r--tests/correctness_probe.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/correctness_probe.c b/tests/correctness_probe.c
index a7c15df..9ac74ca 100644
--- a/tests/correctness_probe.c
+++ b/tests/correctness_probe.c
@@ -36,12 +36,11 @@ int main(void)
fail_realloc = 1;
bool ok = term_snapshot_update(s, t);
uint32_t cps[16];
- const struct term_cell *row = term_snapshot_row(s, 0);
- int n = row ? term_snapshot_cluster(s, row[0].text, cps, 16) : 0;
- printf("snapshot arena allocation failure: update=%d cluster_length=%d (expected false and empty)\n", ok, n);
- failed |= ok || term_snapshot_view(s)->size.x != 0 || term_snapshot_view(s)->size.y != 0;
+ printf("snapshot arena allocation failure: update=%d size=%dx%d (expected false and the previous 8x3 view)\n",
+ ok, term_snapshot_view(s)->size.x, term_snapshot_view(s)->size.y);
+ failed |= ok || term_snapshot_view(s)->size.x != 8 || term_snapshot_view(s)->size.y != 3;
assert(term_snapshot_update(s, t));
- n = term_snapshot_cluster(s, term_snapshot_row(s, 0)[0].text, cps, 16);
+ int n = term_snapshot_cluster(s, term_snapshot_row(s, 0)[0].text, cps, 16);
printf("retry after allocation recovers: cluster_length=%d (expected 2)\n", n);
failed |= n != 2 || cps[0] != 'e' || cps[1] != 0x301;
term_snapshot_free(s);