diff options
author | Daniel Baumann <daniel@debian.org> | 2024-11-17 07:11:26 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2024-11-17 07:11:26 +0100 |
commit | d5587ccda8edb748ca8bfd1f0ed92a801ac5bfc6 (patch) | |
tree | 705ea89e798053f9c227b85512bc9f5b437b0093 /tests/lib/test_ttable.c | |
parent | Releasing debian version 10.1.1-3. (diff) | |
download | frr-d5587ccda8edb748ca8bfd1f0ed92a801ac5bfc6.tar.xz frr-d5587ccda8edb748ca8bfd1f0ed92a801ac5bfc6.zip |
Merging upstream version 10.2.
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to 'tests/lib/test_ttable.c')
-rw-r--r-- | tests/lib/test_ttable.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/tests/lib/test_ttable.c b/tests/lib/test_ttable.c index 562ddf9d..7ac0e351 100644 --- a/tests/lib/test_ttable.c +++ b/tests/lib/test_ttable.c @@ -20,7 +20,7 @@ int main(int argc, char **argv) assert(tt->nrows == 1); table = ttable_dump(tt, "\n"); fprintf(stdout, "%s\n", table); - XFREE(MTYPE_TMP, table); + XFREE(MTYPE_TMP_TTABLE, table); /* add new row with 1 column, assert that it is not added */ assert(ttable_add_row(tt, "%s", "Garbage") == NULL); @@ -28,7 +28,7 @@ int main(int argc, char **argv) assert(tt->nrows == 1); table = ttable_dump(tt, "\n"); fprintf(stdout, "%s\n", table); - XFREE(MTYPE_TMP, table); + XFREE(MTYPE_TMP_TTABLE, table); /* add new row, assert that it is added */ assert(ttable_add_row(tt, "%s|%s|%s", "a", "b", "c")); @@ -36,7 +36,7 @@ int main(int argc, char **argv) assert(tt->nrows == 2); table = ttable_dump(tt, "\n"); fprintf(stdout, "%s\n", table); - XFREE(MTYPE_TMP, table); + XFREE(MTYPE_TMP_TTABLE, table); /* add empty row, assert that it is added */ assert(ttable_add_row(tt, "||")); @@ -44,7 +44,7 @@ int main(int argc, char **argv) assert(tt->nrows == 3); table = ttable_dump(tt, "\n"); fprintf(stdout, "%s\n", table); - XFREE(MTYPE_TMP, table); + XFREE(MTYPE_TMP_TTABLE, table); /* delete 1st row, assert that it is removed */ ttable_del_row(tt, 0); @@ -52,7 +52,7 @@ int main(int argc, char **argv) assert(tt->nrows == 2); table = ttable_dump(tt, "\n"); fprintf(stdout, "%s\n", table); - XFREE(MTYPE_TMP, table); + XFREE(MTYPE_TMP_TTABLE, table); /* delete last row, assert that it is removed */ ttable_del_row(tt, 0); @@ -60,7 +60,7 @@ int main(int argc, char **argv) assert(tt->nrows == 1); table = ttable_dump(tt, "\n"); fprintf(stdout, "%s\n", table); - XFREE(MTYPE_TMP, table); + XFREE(MTYPE_TMP_TTABLE, table); /* delete the remaining row, check dumping an empty table */ ttable_del_row(tt, 0); @@ -68,7 +68,7 @@ int main(int argc, char **argv) assert(tt->nrows == 0); table = ttable_dump(tt, "\n"); fprintf(stdout, "%s\n", table); - XFREE(MTYPE_TMP, table); + XFREE(MTYPE_TMP_TTABLE, table); /* add new row */ ttable_add_row(tt, "%s|%s||%s|%9d", "slick", "black", "triple", 1337); @@ -76,7 +76,7 @@ int main(int argc, char **argv) assert(tt->nrows == 1); table = ttable_dump(tt, "\n"); fprintf(stdout, "%s\n", table); - XFREE(MTYPE_TMP, table); + XFREE(MTYPE_TMP_TTABLE, table); /* add bigger row */ ttable_add_row(tt, "%s|%s||%s|%s", @@ -86,7 +86,7 @@ int main(int argc, char **argv) assert(tt->nrows == 2); table = ttable_dump(tt, "\n"); fprintf(stdout, "%s\n", table); - XFREE(MTYPE_TMP, table); + XFREE(MTYPE_TMP_TTABLE, table); /* insert new row at beginning */ ttable_insert_row(tt, 0, "%s|%s||%d|%lf", "converting", "vegetarians", @@ -95,7 +95,7 @@ int main(int argc, char **argv) assert(tt->nrows == 3); table = ttable_dump(tt, "\n"); fprintf(stdout, "%s\n", table); - XFREE(MTYPE_TMP, table); + XFREE(MTYPE_TMP_TTABLE, table); /* insert new row at end */ ttable_insert_row(tt, tt->nrows - 1, "%s|%s||%d|%ld", "converting", @@ -104,7 +104,7 @@ int main(int argc, char **argv) assert(tt->nrows == 4); table = ttable_dump(tt, "\n"); fprintf(stdout, "%s\n", table); - XFREE(MTYPE_TMP, table); + XFREE(MTYPE_TMP_TTABLE, table); /* insert new row at middle */ ttable_insert_row(tt, 1, "%s|%s||%s|%ld", "she", "pioneer", "aki", 1l); @@ -112,7 +112,7 @@ int main(int argc, char **argv) assert(tt->nrows == 5); table = ttable_dump(tt, "\n"); fprintf(stdout, "%s\n", table); - XFREE(MTYPE_TMP, table); + XFREE(MTYPE_TMP_TTABLE, table); /* set alignment */ ttable_align(tt, 0, 1, 2, 2, LEFT); @@ -120,14 +120,14 @@ int main(int argc, char **argv) assert(tt->nrows == 5); table = ttable_dump(tt, "\n"); fprintf(stdout, "%s\n", table); - XFREE(MTYPE_TMP, table); + XFREE(MTYPE_TMP_TTABLE, table); ttable_align(tt, 0, 1, 5, 1, RIGHT); assert(tt->ncols == 5); assert(tt->nrows == 5); table = ttable_dump(tt, "\n"); fprintf(stdout, "%s\n", table); - XFREE(MTYPE_TMP, table); + XFREE(MTYPE_TMP_TTABLE, table); /* set padding */ ttable_pad(tt, 0, 1, 1, 1, RIGHT, 2); @@ -135,14 +135,14 @@ int main(int argc, char **argv) assert(tt->nrows == 5); table = ttable_dump(tt, "\n"); fprintf(stdout, "%s\n", table); - XFREE(MTYPE_TMP, table); + XFREE(MTYPE_TMP_TTABLE, table); ttable_pad(tt, 0, 0, 5, 4, LEFT, 2); assert(tt->ncols == 5); assert(tt->nrows == 5); table = ttable_dump(tt, "\n"); fprintf(stdout, "%s\n", table); - XFREE(MTYPE_TMP, table); + XFREE(MTYPE_TMP_TTABLE, table); /* restyle */ tt->style.cell.border.bottom_on = false; @@ -156,13 +156,13 @@ int main(int argc, char **argv) ttable_rowseps(tt, 1, TOP, true, '-'); table = ttable_dump(tt, "\n"); fprintf(stdout, "%s\n", table); - XFREE(MTYPE_TMP, table); + XFREE(MTYPE_TMP_TTABLE, table); /* column separators for leftmost column */ ttable_colseps(tt, 0, RIGHT, true, '|'); table = ttable_dump(tt, "\n"); fprintf(stdout, "%s\n", table); - XFREE(MTYPE_TMP, table); + XFREE(MTYPE_TMP_TTABLE, table); /* delete table */ ttable_del(tt); |