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

Re: [PATCH v2] apply: add unit tests for parse_range

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 6, 2024, 17:24 UTC
Message-ID
<xmqqle3im1bx.fsf@gitster.g>
In-Reply-To
<pull.1677.v2.git.git.1716710073910.gitgitgadget@gmail.com>
"Philip Peterson via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 6 quoted lines
> From: Philip Peterson <philip.c.peterson@gmail.com>
>
> Also rename parse_range to parse_fragment_range for external linkage.
>
> Signed-off-by: Philip Peterson <philip.c.peterson@gmail.com>
> ---
This version saw no reviews (unfortunately).

I just gave another quick glance, did not spot anything glaringly wrong, and the way the tests are organized as a series of ...

Show 8 quoted lines
> +	TEST(setup_static((struct test_case) {
> +		.line = "@@ -4,4",
> +		.offset = -1,
> +		.expect_suffix = " +",
> +		.expect_result = FAILURE,
> +		.expect_p1 = 9999,
> +		.expect_p2 = 9999
> +	}), "negative offset");

... rather pleasant to read. I'd admit that it does not count as a proper review, though.

Thanks.
Previous: Philip Peterson via GitGitGadgetNext: Phillip Wood
Message 10 of 12 in “apply: add unit tests for parse_range”
  1. 0/2 apply: add unit tests for parse_rangePhilip Peterson via GitGitGadget, Feb 19, 2024
  2. 1/2 apply: add unit tests for parse_range and rename to parse_fragment_rangePhilip Peterson via GitGitGadget, Feb 19, 2024
  3. Junio C HamanoFeb 19, 2024
  4. PhilipApr 4, 2024
  5. Junio C HamanoApr 4, 2024
  6. 2/2 apply: rewrite unit tests with structured casesPhilip Peterson via GitGitGadget, Feb 19, 2024
  7. Junio C HamanoFeb 19, 2024
  8. Kristoffer HaugsbakkFeb 19, 2024
  9. apply: add unit tests for parse_rangePhilip Peterson via GitGitGadget, May 26, 2024
  10. Junio C HamanoJun 6, 2024
  11. Phillip WoodJun 7, 2024
  12. Junio C HamanoJun 7, 2024

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.