From: phillip.wood123@gmail.com Date: Tue, 03 Sep 2024 09:48:01 GMT Subject: Re: [PATCH v6 11/13] t/unit-tests: convert strvec tests to use clar Message-ID: <3be1d990-9f9c-4963-bce3-742511b79022@gmail.com> In-Reply-To: Hi Patrick On 03/09/2024 08:45, Patrick Steinhardt wrote: > On Wed, Aug 28, 2024 at 02:17:05PM +0100, Phillip Wood wrote: >> Hi Patrick >> >> On 20/08/2024 15:02, Patrick Steinhardt wrote: >> It might be a good opportunity to show the set-up and tear-down facilities >> in clar as well instead of repeating the initialization in each test. > > I don't think it's a good fit here, as setup and teardown would hit the > system under test. I rather think they should be used in cases where you > e.g. always have to setup a repository for your tests. I'm not sure I follow. I was suggesting we define test_strvec__initialize() to initialize a global strvec which the tests use and is then freed by test_strvec__cleanup() like the tests/adding.c example the clar's README.md. That would allow use to remove the setup and teardown from each test. As I understand it clar's setup/cleanup functionality is usable without setting up a sandbox directory for each test. I'll take a look at v7 in the next few days - I suspect we're getting to the point where it's ready to be merged. Best Wishes Phillip > Patrick