mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-17 05:33:52 -04:00
vt: unittest: verify emoji_vs list is sorted
This commit is contained in:
parent
ecb1ca61af
commit
7378ecf9a7
1 changed files with 14 additions and 0 deletions
14
vt.c
14
vt.c
|
|
@ -672,6 +672,20 @@ emoji_vs_compare(const void *_key, const void *_entry)
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UNITTEST
|
||||||
|
{
|
||||||
|
/* Verify the emoji_vs list is sorted */
|
||||||
|
int64_t last_end = -1;
|
||||||
|
|
||||||
|
for (size_t i = 0; i < sizeof(emoji_vs) / sizeof(emoji_vs[0]); i++) {
|
||||||
|
const struct emoji_vs *vs = &emoji_vs[i];
|
||||||
|
xassert(vs->start <= vs->end);
|
||||||
|
xassert(vs->start > last_end);
|
||||||
|
xassert(vs->vs15 || vs->vs16);
|
||||||
|
last_end = vs->end;
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue