Re: [PATCH v3 01/11] t: move reftable/record_test.c to the unit testing framework
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Jun 30, 2024, 16:24 UTC
- Message-ID
- <CAOLa=ZSrSnOaOf02f-+BsZi79=+t-AAuMdieqH_jAi3j19tdtw@mail.gmail.com>
- In-Reply-To
- <20240628063625.4092-2-chandrapratap3519@gmail.com>
Chandra Pratap <chandrapratap3519@gmail.com> writes:
[snip]
Show 27 quoted lines
> @@ -369,14 +357,15 @@ static void test_reftable_index_record_roundtrip(void)
> strbuf_release(&in.u.idx.last_key);
> }
>
> -int record_test_main(int argc, const char *argv[])
> +int cmd_main(int argc, const char *argv[])
> {
> - RUN_TEST(test_reftable_log_record_equal);
> - RUN_TEST(test_reftable_log_record_roundtrip);
> - RUN_TEST(test_reftable_ref_record_roundtrip);
> - RUN_TEST(test_varint_roundtrip);
> - RUN_TEST(test_key_roundtrip);
> - RUN_TEST(test_reftable_obj_record_roundtrip);
> - RUN_TEST(test_reftable_index_record_roundtrip);
> - return 0;
> + TEST(test_reftable_log_record_equal(), "reftable_log_record_equal works");
> + TEST(test_reftable_log_record_roundtrip(), "record operations work on log record");
> + TEST(test_reftable_ref_record_roundtrip(), "record operations work on ref record");
> + TEST(test_varint_roundtrip(), "put_var_int and get_var_int work");
> + TEST(test_key_roundtrip(), "reftable_encode_key and reftable_decode_key work");
> + TEST(test_reftable_obj_record_roundtrip(), "record operations work on obj record");
> + TEST(test_reftable_index_record_roundtrip(), "record operations work on index record");
> +
> + return test_done();
> }
> --
> 2.45.2.404.g9eaef5822cI think it would be nice to be consistent with the naming of the tests with other unit-tests as mentioned in the previous version too [1].
[1]: https://lore.kernel.org/r/CAOLa=ZSmnMLMoKKWMiM7M4Jw8CJ0Jvrs0oMLy18FHaLv_6s6yA@mail.gmail.com