git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Philip Peterson via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Philip Peterson <philip.c.peterson@gmail.com>
Subject: [PATCH 0/2] apply: add unit tests for parse_range
Date: Mon, 19 Feb 2024 04:45:36 +0000	[thread overview]
Message-ID: <pull.1677.git.git.1708317938.gitgitgadget@gmail.com> (raw)

Hello all,

This patchset adds unit tests for apply's parse_range function. Also renames
parse_range to parse_fragment_range.

It was necessary to make the function be non-internal linkage in order to
expose it to the unit testing framework. Because there is another function
in the codebase also called parse_range, I changed this one to a more
specific name as well: parse_fragment_range. There are also several test
cases added (both positive and negative) for the function.

Thank you for your help,

Philip

Philip Peterson (2):
  apply: add unit tests for parse_range and rename to
    parse_fragment_range
  apply: rewrite unit tests with structured cases

 Makefile               |   1 +
 apply.c                |   8 ++--
 apply.h                |   4 ++
 t/unit-tests/t-apply.c | 100 +++++++++++++++++++++++++++++++++++++++++
 4 files changed, 109 insertions(+), 4 deletions(-)
 create mode 100644 t/unit-tests/t-apply.c


base-commit: 186b115d3062e6230ee296d1ddaa0c4b72a464b5
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1677%2Fphilip-peterson%2Fpeterson%2Funit-tests-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1677/philip-peterson/peterson/unit-tests-v1
Pull-Request: https://github.com/git/git/pull/1677
-- 
gitgitgadget


             reply	other threads:[~2024-02-19  4:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-19  4:45 Philip Peterson via GitGitGadget [this message]
2024-02-19  4:45 ` [PATCH 1/2] apply: add unit tests for parse_range and rename to parse_fragment_range Philip Peterson via GitGitGadget
2024-02-19 21:35   ` Junio C Hamano
2024-04-04  3:53     ` Philip
2024-04-04 19:27       ` Junio C Hamano
2024-02-19  4:45 ` [PATCH 2/2] apply: rewrite unit tests with structured cases Philip Peterson via GitGitGadget
2024-02-19 21:49   ` Junio C Hamano
2024-02-19 22:04   ` Kristoffer Haugsbakk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.1677.git.git.1708317938.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=philip.c.peterson@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).