[gnumeric] Deps: debug code.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Deps: debug code.
- Date: Thu, 2 Jul 2020 03:13:51 +0000 (UTC)
commit 02635dabcb9e04a173c968a53393f528c666a837
Author: Morten Welinder <terra gnome org>
Date: Wed Jul 1 23:13:22 2020 -0400
Deps: debug code.
src/dependent.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
---
diff --git a/src/dependent.c b/src/dependent.c
index 6309ba161..184f0888b 100644
--- a/src/dependent.c
+++ b/src/dependent.c
@@ -3004,6 +3004,22 @@ gnm_dep_container_new (Sheet *sheet)
{
GnmDepContainer *deps = g_new (GnmDepContainer, 1);
+ if (gnm_debug_flag ("dep-buckets")) {
+ int r, lastb = 0;
+ g_assert (bucket_start_row (0) == 0);
+ g_assert (bucket_end_row (0) >= 0);
+ g_assert (bucket_of_row (0) == 0);
+ for (r = 1; r < gnm_sheet_get_max_rows (sheet); r++) {
+ int b = bucket_of_row (r);
+ if (b > lastb)
+ g_printerr ("%d -> %d\n", r, b);
+ g_assert (b == lastb || b == lastb + 1);
+ g_assert (bucket_start_row (b) <= r);
+ g_assert (r <= bucket_end_row (b));
+ lastb = b;
+ }
+ }
+
deps->head = deps->tail = NULL;
deps->buckets = 1 + bucket_of_row (gnm_sheet_get_last_row (sheet));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]