mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-16 06:18:47 +02:00
Add a second torture test to test hash-table resizing.
All checks were successful
Remind unit tests / tests (push) Successful in 31s
All checks were successful
Remind unit tests / tests (push) Successful in 31s
This commit is contained in:
@@ -77,6 +77,13 @@ FreeXlateItem(XlateItem *item)
|
||||
|
||||
static void
|
||||
RemoveTranslation(XlateItem *item)
|
||||
{
|
||||
hash_table_delete(&TranslationTable, item);
|
||||
FreeXlateItem(item);
|
||||
}
|
||||
|
||||
static void
|
||||
RemoveTranslationNoResize(XlateItem *item)
|
||||
{
|
||||
hash_table_delete_no_resize(&TranslationTable, item);
|
||||
FreeXlateItem(item);
|
||||
@@ -96,7 +103,7 @@ ClearTranslationTable(void)
|
||||
item = hash_table_next(&TranslationTable, NULL);
|
||||
while(item) {
|
||||
next = hash_table_next(&TranslationTable, item);
|
||||
RemoveTranslation(item);
|
||||
RemoveTranslationNoResize(item);
|
||||
item = next;
|
||||
}
|
||||
hash_table_free(&TranslationTable);
|
||||
|
||||
@@ -619,6 +619,9 @@ fi
|
||||
# Test --print-tokens long option
|
||||
../src/remind --print-tokens < /dev/null >> ../tests/test.out 2>&1
|
||||
|
||||
# Torture test #2
|
||||
../src/remind ../tests/torture2.rem >> ../tests/test.out 2>&1
|
||||
|
||||
# Make sure all the include files are ok
|
||||
find ../include -type f -name '*.rem' | while read x; do ../src/remind -n $x 1 Jan 2024 2>>../tests/test.out 1>/dev/null; done
|
||||
cmp -s ../tests/test.out ../tests/test.cmp
|
||||
|
||||
@@ -24064,3 +24064,12 @@ $Uw
|
||||
$Uy
|
||||
$Was
|
||||
$Wednesday
|
||||
No reminders.
|
||||
Var hash: total = 1; maxlen = 1; avglen = 0.059
|
||||
Func hash: total = 1; maxlen = 1; avglen = 0.059
|
||||
Dedup hash: total = 0; maxlen = 0; avglen = 0.000
|
||||
Trans hash: total = 1; maxlen = 1; avglen = 0.059
|
||||
Expression nodes allocated: 300032
|
||||
Expression nodes high-water: 300000
|
||||
Expression nodes leaked: 0
|
||||
Parse level high-water: 7
|
||||
|
||||
600004
tests/torture2.rem
Normal file
600004
tests/torture2.rem
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user