<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/reftable/test_framework.h, branch v2.43.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.43.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.43.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2023-12-11T15:23:15Z</updated>
<entry>
<title>reftable: wrap EXPECT macros in do/while</title>
<updated>2023-12-11T15:23:15Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2023-12-11T09:07:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e32b8ece640fc700c5a74dd53e6cae8b1a893a6d'/>
<id>urn:sha1:e32b8ece640fc700c5a74dd53e6cae8b1a893a6d</id>
<content type='text'>
The `EXPECT` macros used by the reftable test framework are all using a
single `if` statement with the actual condition. This results in weird
syntax when using them in if/else statements like the following:

```
if (foo)
	EXPECT(foo == 2)
else
	EXPECT(bar == 2)
```

Note that there need not be a trailing semicolon. Furthermore, it is not
immediately obvious whether the else now belongs to the `if (foo)` or
whether it belongs to the expanded `if (foo == 2)` from the macro.

Fix this by wrapping the macros in a do/while loop.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>reftable: utility functions</title>
<updated>2021-10-08T17:45:48Z</updated>
<author>
<name>Han-Wen Nienhuys</name>
<email>hanwen@google.com</email>
</author>
<published>2021-10-07T20:25:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ef8a6c62687984f2562463286e60ec1c66242b5c'/>
<id>urn:sha1:ef8a6c62687984f2562463286e60ec1c66242b5c</id>
<content type='text'>
This commit provides basic utility classes for the reftable library.

Signed-off-by: Han-Wen Nienhuys &lt;hanwen@google.com&gt;
Helped-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
