aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_overflow.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-02-24 21:07:07 -0500
committerDavid Robillard <d@drobilla.net>2021-03-08 23:23:05 -0500
commit36e2f27502524155e6475a75ffcab4999fce166a (patch)
treec193ccab896fa63a48e0dba5eecfccfc9ec46a2b /test/test_overflow.c
parent02507b57fae1e29572a11be8894b7dde9048da5d (diff)
downloadserd-36e2f27502524155e6475a75ffcab4999fce166a.tar.gz
serd-36e2f27502524155e6475a75ffcab4999fce166a.tar.bz2
serd-36e2f27502524155e6475a75ffcab4999fce166a.zip
Align node allocations
Diffstat (limited to 'test/test_overflow.c')
-rw-r--r--test/test_overflow.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/test/test_overflow.c b/test/test_overflow.c
index 5889a867..a4d59368 100644
--- a/test/test_overflow.c
+++ b/test/test_overflow.c
@@ -39,19 +39,21 @@ main(void)
size_t stack_size;
} Test;
- const Test tests[] = {{":s :p :%99 .", 338},
- {":s :p <http://", 336},
- {":s :p eg:foo", 337},
- {":s :p 1234", 307},
- {":s :p 1234", 338},
- {":s :p (1 2 3 4) .", 352},
- {"@prefix eg: <http://example.org> .", 239},
- {":s :p \"literal\"", 336},
- {":s :p \"verb\"", 275},
- {":s :p _:blank .", 307},
- {":s :p true .", 307},
- {":s :p true .", 341},
- {":s :p \"\"@en .", 339},
+ const size_t sizes = 3 * sizeof(size_t);
+
+ const Test tests[] = {{":s :p :%99 .", sizes + 280},
+ {":s :p <http://", sizes + 276},
+ {":s :p eg:foo", sizes + 275},
+ {":s :p 1234", sizes + 177},
+ {":s :p 1234", sizes + 280},
+ {":s :p (1 2 3 4) .", 8 * sizeof(size_t) + 357},
+ {"@prefix eg: <http://example.org> .", sizes + 224},
+ {":s :p \"literal\"", sizes + 264},
+ {":s :p \"verb\"", sizes + 263},
+ {":s :p _:blank .", sizes + 276},
+ {":s :p true .", sizes + 295},
+ {":s :p true .", sizes + 329},
+ {":s :p \"\"@en .", sizes + 302},
{NULL, 0}};
SerdWorld* world = serd_world_new();