Re: [PATCH v2 1/7] t: move reftable/merged_test.c to the unit testing framework

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 24/07/09 10:58AM, Chandra Pratap wrote:
> reftable/merged_test.c exercises the functions defined in
> reftable/merged.{c, h}. Migrate reftable/merged_test.c to the unit
> testing framework. Migration involves refactoring the tests
> to use the unit testing framework instead of reftable's test
> framework and renaming the tests according to unit-tests' naming
> conventions.
> 
> Also, move strbuf_add_void() and noop_flush() from
> reftable/test_framework.c to the ported test. This is because
> both these functions are used in the merged tests and
> reftable/test_framework.{c, h} is not #included in the ported test.
> 
[snip]
>  
> -int merged_test_main(int argc, const char *argv[])

Since we are removing this function definition, should we also remove
`merged_test_main` from "reftable/reftable-tests.h"?

> +int cmd_main(int argc, const char *argv[])
>  {
> -	RUN_TEST(test_merged_logs);
> -	RUN_TEST(test_merged_between);
> -	RUN_TEST(test_merged);
> -	RUN_TEST(test_default_write_opts);
> -	return 0;
> +	TEST(t_default_write_opts(), "merged table with default write opts");
> +	TEST(t_merged_logs(), "merged table with multiple log updates for same ref");
> +	TEST(t_merged_refs(), "merged table with multiple updates to same ref");
> +	TEST(t_merged_single_record(), "ref ocurring in only one record can be fetched");
> +
> +	return test_done();
>  }
> -- 
> 2.45.2.404.g9eaef5822c
> 
> 




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux