git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v5 3/4] test-strcmp-offset: created test for strcmp_offset

From
René Scharfe <l.s.r@web.de>
Date
Apr 6, 2017, 20:20 UTC
Message-ID
<4da78dff-7caa-b560-8af9-f5a3dfc0bed2@web.de>
In-Reply-To
<20170405173809.3098-4-git@jeffhostetler.com>
Am 05.04.2017 um 19:38 schrieb git@jeffhostetler.com:
Show 28 quoted lines
> diff --git a/t/helper/test-strcmp-offset.c b/t/helper/test-strcmp-offset.c
> new file mode 100644
> index 0000000..fe01318
> --- /dev/null
> +++ b/t/helper/test-strcmp-offset.c
> @@ -0,0 +1,64 @@
> +#include "cache.h"
> +
> +struct test_data {
> +	const char *s1;
> +	const char *s2;
> +	int first_change;
> +};
> +
> +static struct test_data data[] = {
> +	{ "abc", "abc", 0 },
> +	{ "abc", "def", 0 },
> +
> +	{ "abc", "abz", 2 },
> +
> +	{ "abc", "abcdef", 3 },
> +
> +	{ "abc\xF0zzz", "abc\xFFzzz", 3 },
> +
> +	{ NULL, NULL, 0 }
> +};
> +
> +int try_pair(const char *sa, const char *sb, int first_change)
This should be static, right?  Found with -Wmissing-prototypes.
Show 7 quoted lines
> +{
> +	int failed = 0;
> +	int offset, r_exp, r_tst;
> +	int r_exp_sign, r_tst_sign;
> +
> +	/*
> +	 * Because differnt CRTs behave differently, only rely on signs
s/differnt/different/
René
Previous: Jeff HostetlerNext: Jeff Hostetler
Message 9 of 16 in “read-cache: speed up add_index_entry”
  1. 0/4 read-cache: speed up add_index_entrygit@jeffhostetler.com, Apr 5, 2017
  2. 4/4 read-cache: speed up add_index_entry during checkoutgit@jeffhostetler.com, Apr 5, 2017
  3. SZEDER GáborApr 5, 2017
  4. Jeff HostetlerApr 6, 2017
  5. 3/4 test-strcmp-offset: created test for strcmp_offsetgit@jeffhostetler.com, Apr 5, 2017
  6. SZEDER GáborApr 5, 2017
  7. Johannes SchindelinApr 6, 2017
  8. Jeff HostetlerApr 6, 2017
  9. René ScharfeApr 6, 2017
  10. Jeff HostetlerApr 6, 2017
  11. 1/4 p0004-read-tree: perf test to time read-treegit@jeffhostetler.com, Apr 5, 2017
  12. René ScharfeApr 6, 2017
  13. Jeff HostetlerApr 6, 2017
  14. 2/4 read-cache: add strcmp_offset functiongit@jeffhostetler.com, Apr 5, 2017
  15. SZEDER GáborApr 6, 2017
  16. Jeff HostetlerApr 6, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.