diff mbox series

[v3,08/11] reftable: order unittests by complexity

Message ID 9dce18d7349fe2a27859c224068fb5a386f263f1.1639411309.git.gitgitgadget@gmail.com (mailing list archive)
State Superseded
Headers show
Series Reftable coverity fixes | expand

Commit Message

Han-Wen Nienhuys Dec. 13, 2021, 4:01 p.m. UTC
From: Han-Wen Nienhuys <hanwen@google.com>

This is a more pratical ordering when working on refactorings of the reftable
code.

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
---
 t/helper/test-reftable.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Comments

Ævar Arnfjörð Bjarmason Dec. 13, 2021, 4:25 p.m. UTC | #1
On Mon, Dec 13 2021, Han-Wen Nienhuys via GitGitGadget wrote:

> From: Han-Wen Nienhuys <hanwen@google.com>
>
> This is a more pratical ordering when working on refactorings of the reftable
> code.
>
> Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
> ---
>  t/helper/test-reftable.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/t/helper/test-reftable.c b/t/helper/test-reftable.c
> index 26b03d7b789..f08d66df949 100644
> --- a/t/helper/test-reftable.c
> +++ b/t/helper/test-reftable.c
> @@ -3,15 +3,16 @@
>  
>  int cmd__reftable(int argc, const char **argv)
>  {
> +	// test from simple to complex.

A C99 comment, which I don't mind, but is explicitly forbidden by the
style guide (and when I mentioned recently that we didn't have any
portability reasons not to use these, there wasn't much/any interest in
changing that...).
Han-Wen Nienhuys Dec. 13, 2021, 4:45 p.m. UTC | #2
On Mon, Dec 13, 2021 at 5:26 PM Ævar Arnfjörð Bjarmason
<avarab@gmail.com> wrote:
> A C99 comment, which I don't mind, but is explicitly forbidden by the
> style guide (and when I mentioned recently that we didn't have any
> portability reasons not to use these, there wasn't much/any interest in
> changing that...).

sorry, I missed this comment in a previous round. Fixed now.
Junio C Hamano Dec. 13, 2021, 10:13 p.m. UTC | #3
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

>>  int cmd__reftable(int argc, const char **argv)
>>  {
>> +	// test from simple to complex.
>
> A C99 comment, which I don't mind, but is explicitly forbidden by the
> style guide (and when I mentioned recently that we didn't have any
> portability reasons not to use these, there wasn't much/any interest in
> changing that...).

Unlike the decl-after-statement thing, I personally do not mind
something that does not upset compilers and does not hurt human
readability greatly, like the use of "//".  But I do not care about
it deeply enough to find it worth my time to raise it as a separate
topic and update the guideline.
diff mbox series

Patch

diff --git a/t/helper/test-reftable.c b/t/helper/test-reftable.c
index 26b03d7b789..f08d66df949 100644
--- a/t/helper/test-reftable.c
+++ b/t/helper/test-reftable.c
@@ -3,15 +3,16 @@ 
 
 int cmd__reftable(int argc, const char **argv)
 {
+	// test from simple to complex.
 	basics_test_main(argc, argv);
+	record_test_main(argc, argv);
 	block_test_main(argc, argv);
-	merged_test_main(argc, argv);
+	tree_test_main(argc, argv);
 	pq_test_main(argc, argv);
-	record_test_main(argc, argv);
-	refname_test_main(argc, argv);
 	readwrite_test_main(argc, argv);
+	merged_test_main(argc, argv);
 	stack_test_main(argc, argv);
-	tree_test_main(argc, argv);
+	refname_test_main(argc, argv);
 	return 0;
 }