t: port reftable/tree_test.c to the unit testing framework
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v7 Latest posting 2/25 patches 4 repliesIn review
- v6 posting 2/25 patches 1 replySuperseded
- v7 posting 1/27 patches 2 repliesSuperseded
Earlier versions · 8
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v6 posting 1/2 | 7 patches | 3 replies | Superseded | |
| v5 posting 2/2 | 7 patches | 9 replies | Superseded | |
| v5 posting 1/2 | 5 patches | 5 replies | Superseded | |
| v4 posting 2/2 | 5 patches | 11 replies | Superseded | |
| v4 posting 1/2 | 7 patches | 1 reply | Superseded | |
| v3 | 7 patches | 1 reply | Superseded | |
| v2 | 7 patches | 4 replies | Superseded | |
| v1 | 5 patches | 5 replies | Superseded |
Changes in v7 from the cover letter
- Fix style issues in a comment introduced in patch 3 of the previous series
Patches in v7 posting 2/2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | reftable: remove unnecessary curly braces in reftable/tree.creftable/ | +5 | 0 replies | |
| 2/5 | t: move reftable/tree_test.c to the unit testing frameworkMakefile reftable/ reftable/ +2 more | +61 | 0 replies | |
| 3/5 | t-reftable-tree: split test_tree() into two sub-test functionst/ | +19 | 0 replies | |
| 4/5 | t-reftable-tree: add test for non-existent keyt/ | +1 | 0 replies | |
| 5/5 | t-reftable-tree: improve the test for infix_walk()t/ | +15 | 0 replies |
Reviews trailers per patch
None of the 5 patches has a Reviewed-by or Acked-by.
| Patch | Patrick Steinhardt | Christian Couder |
|---|---|---|
| Series | Mentored-by | Mentored-by |
| 1/5 | Mentored-by | Mentored-by |
| 2/5 | Mentored-by | Mentored-by |
| 3/5 | Mentored-by | Mentored-by |
| 4/5 | Mentored-by | Mentored-by |
| 5/5 | Mentored-by | Mentored-by |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [GSoC][PATCH v7 0/5] t: port reftable/tree_test.c to the unit testing framework
The reftable library comes with self tests, which are exercised as part of the usual end-to-end tests and are designed to observe the end-user visible effects of Git commands. What it exercises, however, is a better match for the unit-testing framework, merged at 8bf6fbd0 (Merge branch 'js/doc-unit-tests', 2023-12-09), which is designed to observe how low level implementation details, at the level of sequences of individual function calls, behave.
Hence, port reftable/tree_test.c to the unit testing framework and improve upon the ported test. The first patch in the series is preparatory cleanup, the second patch moves the test to the unit testing framework, and the rest of the patches improve upon the ported test.
---
Changes in v7:
- Fix style issues in a comment introduced in patch 3 of the previous series
CI/PR: https://github.com/gitgitgadget/git/pull/1740
Chandra Pratap(5):
reftable: remove unnecessary curly braces in reftable/tree.c
t: move reftable/tree_test.c to the unit testing framework
t-reftable-tree: split test_tree() into two sub-test
t-reftable-tree: add test for non-existent key
t-reftable-tree: improve the test for infix_walk()
Makefile | 2 +- reftable/reftable-tests.h | 1 - reftable/tree.c | 15 +++------- reftable/tree_test.c | 60 ---------------------- t/helper/test-reftable.c | 1 - t/unit-tests/t-reftable-tree.c | 83 +++++++++++++++++++++++++++++++++++++ 6 files changed, 89 insertions(+), 73 deletions(-)
Range-diff against v6:
1: d4a45e602c = 1: d738bf57e2 reftable: remove unnecessary curly braces in reftable/tree.c
2: 9148e740e8 ! 2: f090ace685 t: move reftable/tree_test.c to the unit testing framework
@@ t/unit-tests/t-reftable-tree.c (new)
+ size_t i = 1;
+ struct curry c = { 0 };
+
-+ /* pseudo-randomly insert the pointers for elements between
-+ * values[1] and values[10] (included) in the tree.
++ /*
++ * Pseudo-randomly insert the pointers for elements between
++ * values[1] and values[10] (inclusive) in the tree.
+ */
+ do {
+ nodes[i] = tree_search(&values[i], &root, &t_compare, 1);3: f73ad11238 ! 3: 22256e77b3 t-reftable-tree: split test_tree() into two sub-test functions
@@ t/unit-tests/t-reftable-tree.c: static void check_increasing(void *arg, void *ke
size_t i = 1;
- struct curry c = { 0 };
-- /* pseudo-randomly insert the pointers for elements between
-- * values[1] and values[10] (included) in the tree.
-+ /* Pseudo-randomly insert the pointers for elements between
-+ * values[1] and values[10] (inclusive) in the tree.
- */
- do {
- nodes[i] = tree_search(&values[i], &root, &t_compare, 1);
+ /*
+ * Pseudo-randomly insert the pointers for elements between
@@ t/unit-tests/t-reftable-tree.c: static void t_tree(void)
check_pointer_eq(nodes[i], tree_search(&values[i], &root, &t_compare, 0));
}
4: edb02d2e84 = 4: 0d04daad28 t-reftable-tree: add test for non-existent key 5: 6aecd4e374 = 5: 80d4aa2a66 t-reftable-tree: improve the test for infix_walk()