<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/libc/test/UnitTest/LibcTest.h, branch users/nico/python-1</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[libc] Make test macros suppress the -Wdangling-else warnings (#127149)</title>
<updated>2025-02-14T04:05:24+00:00</updated>
<author>
<name>Roland McGrath</name>
<email>mcgrathr@google.com</email>
</author>
<published>2025-02-14T04:05:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e477e568e6d745c98cb81a856988a99fe3a989e3'/>
<id>e477e568e6d745c98cb81a856988a99fe3a989e3</id>
<content type='text'>
Use the trick from gtest to allow `ASSERT_...` and `EXPECT_...`
macros to be used in braceless `if` without producing warnings
about the nested `if`-`else` that results.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the trick from gtest to allow `ASSERT_...` and `EXPECT_...`
macros to be used in braceless `if` without producing warnings
about the nested `if`-`else` that results.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Fix usage of std::nullptr_t in LibcTest.h. (#114321)</title>
<updated>2024-10-30T23:08:47+00:00</updated>
<author>
<name>lntue</name>
<email>lntue@google.com</email>
</author>
<published>2024-10-30T23:08:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a39fb30a4928eef0619bcfaa709645309dff32f9'/>
<id>a39fb30a4928eef0619bcfaa709645309dff32f9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] fix behavior of strrchr(x, '\0') (#112620)</title>
<updated>2024-10-30T22:08:03+00:00</updated>
<author>
<name>George Burgess IV</name>
<email>george.burgess.iv@gmail.com</email>
</author>
<published>2024-10-30T22:08:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=50c44478fe3f680374edf1363d2a3617b8ff2a0b'/>
<id>50c44478fe3f680374edf1363d2a3617b8ff2a0b</id>
<content type='text'>
`strrchr("foo", '\0')` is defined to point to the end of `foo`, rather
than returning NULL. This wasn't caught by tests, since llvm-libc's
`ASSERT_STREQ(nullptr, "");` is not an assertion error.

While I'm here, refactor the test slightly to check for NULL more
specifically. I considered adding fancier `ASSERT`s (and changing the
semantics of `ASSERT_STREQ`), but opted for a more local fix by fair
dice roll.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`strrchr("foo", '\0')` is defined to point to the end of `foo`, rather
than returning NULL. This wasn't caught by tests, since llvm-libc's
`ASSERT_STREQ(nullptr, "");` is not an assertion error.

While I'm here, refactor the test slightly to check for NULL more
specifically. I considered adding fancier `ASSERT`s (and changing the
semantics of `ASSERT_STREQ`), but opted for a more local fix by fair
dice roll.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597)</title>
<updated>2024-07-12T16:28:41+00:00</updated>
<author>
<name>Petr Hosek</name>
<email>phosek@google.com</email>
</author>
<published>2024-07-12T16:28:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5ff3ff33ff930e4ec49da7910612d8a41eb068cb'/>
<id>5ff3ff33ff930e4ec49da7910612d8a41eb068cb</id>
<content type='text'>
This is a part of #97655.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a part of #97655.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration" (#98593)</title>
<updated>2024-07-12T07:12:13+00:00</updated>
<author>
<name>Mehdi Amini</name>
<email>joker.eph@gmail.com</email>
</author>
<published>2024-07-12T07:12:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ce9035f5bd3aa09cbd899489cdbc7f6c18acf1e3'/>
<id>ce9035f5bd3aa09cbd899489cdbc7f6c18acf1e3</id>
<content type='text'>
Reverts llvm/llvm-project#98075

bots are broken</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reverts llvm/llvm-project#98075

bots are broken</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98075)</title>
<updated>2024-07-11T19:35:22+00:00</updated>
<author>
<name>Petr Hosek</name>
<email>phosek@google.com</email>
</author>
<published>2024-07-11T19:35:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3f30effe1bd81fa1b039218a9bfe79c3b03fafad'/>
<id>3f30effe1bd81fa1b039218a9bfe79c3b03fafad</id>
<content type='text'>
This is a part of #97655.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a part of #97655.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] android atest compat (#93852)</title>
<updated>2024-05-30T20:28:11+00:00</updated>
<author>
<name>Nick Desaulniers (paternity leave)</name>
<email>nickdesaulniers@users.noreply.github.com</email>
</author>
<published>2024-05-30T20:28:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6f576d957e7efd2e3b2af90d03e626f0bafbd018'/>
<id>6f576d957e7efd2e3b2af90d03e626f0bafbd018</id>
<content type='text'>
These changes slighly modify the output of the unittests so that they better
match GTest, so that utilities that parse the expected output from GTest (such
as Android's unit test harness) can read the output from our unit tests.

This allows our unit tests to be run on Android devices.

Add very primitive command line parsing to:
- support --gtest_color=no to disable printing terminal colors.
- recognize --gtest_print_time and print the test time in milliseconds.
  - most of our unit tests run on the order of microseconds, so its useful to
    preserve the existing behavior.  But upsteram GTest ONLY prints time tests
    in milliseconds, and Android's atest expects to be able to parse exactly
    that. Atest always passes --gtest_print_time. The word `took` is removed as
    that also differs from upstream GTest, tripping up parsers.
- ignore other --gtest_* flags

Do so so that atest can parse the output correctly.

Print the test number count before
each run, so that atest can parse this value correctly.

Link: https://android-review.googlesource.com/c/platform/external/llvm-libc/+/3107252
Link: https://google.github.io/googletest/advanced.html#colored-terminal-output
Link: https://google.github.io/googletest/advanced.html#suppressing-the-elapsed-time
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These changes slighly modify the output of the unittests so that they better
match GTest, so that utilities that parse the expected output from GTest (such
as Android's unit test harness) can read the output from our unit tests.

This allows our unit tests to be run on Android devices.

Add very primitive command line parsing to:
- support --gtest_color=no to disable printing terminal colors.
- recognize --gtest_print_time and print the test time in milliseconds.
  - most of our unit tests run on the order of microseconds, so its useful to
    preserve the existing behavior.  But upsteram GTest ONLY prints time tests
    in milliseconds, and Android's atest expects to be able to parse exactly
    that. Atest always passes --gtest_print_time. The word `took` is removed as
    that also differs from upstream GTest, tripping up parsers.
- ignore other --gtest_* flags

Do so so that atest can parse the output correctly.

Print the test number count before
each run, so that atest can parse this value correctly.

Link: https://android-review.googlesource.com/c/platform/external/llvm-libc/+/3107252
Link: https://google.github.io/googletest/advanced.html#colored-terminal-output
Link: https://google.github.io/googletest/advanced.html#suppressing-the-elapsed-time
</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Clean up alternate test framework support (#89659)</title>
<updated>2024-04-22T22:18:02+00:00</updated>
<author>
<name>Roland McGrath</name>
<email>mcgrathr@google.com</email>
</author>
<published>2024-04-22T22:18:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d2be9826ddf17378a684ee42e3ac2a17a1c63fa8'/>
<id>d2be9826ddf17378a684ee42e3ac2a17a1c63fa8</id>
<content type='text'>
This replaces the old macros LIBC_COPT_TEST_USE_FUCHSIA and
LIBC_COPT_TEST_USE_PIGWEED with LIBC_COPT_TEST_ZXTEST and
LIBC_COPT_TEST_GTEST, respectively.  These are really not about
whether the code is in the Fuchsia build or in the Pigweed build,
but just about what test framework is being used.  The gtest
framework can be used in many contexts, and the zxtest framework
is not always what's used in the Fuchsia build.

The test/UnitTest/Test.h wrapper header now provides the macro
LIBC_TEST_HAS_MATCHERS() for use in `#if` conditionals on use of
gmock-style matchers, replacing `#if` conditionals that test the
framework selection macros directly.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This replaces the old macros LIBC_COPT_TEST_USE_FUCHSIA and
LIBC_COPT_TEST_USE_PIGWEED with LIBC_COPT_TEST_ZXTEST and
LIBC_COPT_TEST_GTEST, respectively.  These are really not about
whether the code is in the Fuchsia build or in the Pigweed build,
but just about what test framework is being used.  The gtest
framework can be used in many contexts, and the zxtest framework
is not always what's used in the Fuchsia build.

The test/UnitTest/Test.h wrapper header now provides the macro
LIBC_TEST_HAS_MATCHERS() for use in `#if` conditionals on use of
gmock-style matchers, replacing `#if` conditionals that test the
framework selection macros directly.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc][NFC] Move `BigInt` out of the `cpp` namespace (#84445)</title>
<updated>2024-03-08T08:41:23+00:00</updated>
<author>
<name>Guillaume Chatelet</name>
<email>gchatelet@google.com</email>
</author>
<published>2024-03-08T08:41:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6a8e6c9a31933dec276fe26e18090832a9c5d0d0'/>
<id>6a8e6c9a31933dec276fe26e18090832a9c5d0d0</id>
<content type='text'>
As noted in
https://github.com/llvm/llvm-project/pull/84035#discussion_r1516817755
only files under the CPP folder should be in the `cpp` namespace.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As noted in
https://github.com/llvm/llvm-project/pull/84035#discussion_r1516817755
only files under the CPP folder should be in the `cpp` namespace.</pre>
</div>
</content>
</entry>
<entry>
<title>[reland][libc] Remove UB specializations of type traits for `BigInt` (#84299)</title>
<updated>2024-03-07T10:41:35+00:00</updated>
<author>
<name>Guillaume Chatelet</name>
<email>gchatelet@google.com</email>
</author>
<published>2024-03-07T10:41:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=245d669f1d1c3f66d0d3d8aa7cffa5ef0d7747ff'/>
<id>245d669f1d1c3f66d0d3d8aa7cffa5ef0d7747ff</id>
<content type='text'>
Note: This is a reland of #84035.

The standard specifies that it it UB to specialize the following traits:
 - `std::is_integral`
 - `std::is_unsigned`
 - `std::make_unsigned`
 - `std::make_signed`

This patch:
 - Removes specializations for `BigInt`
 - Transforms SFINAE for `bit.h` functions from template parameter to
   return type (This makes specialization easier).
 - Adds `BigInt` specialization for `bit.h` functions.
 - Fixes code depending on previous specializations.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Note: This is a reland of #84035.

The standard specifies that it it UB to specialize the following traits:
 - `std::is_integral`
 - `std::is_unsigned`
 - `std::make_unsigned`
 - `std::make_signed`

This patch:
 - Removes specializations for `BigInt`
 - Transforms SFINAE for `bit.h` functions from template parameter to
   return type (This makes specialization easier).
 - Adds `BigInt` specialization for `bit.h` functions.
 - Fixes code depending on previous specializations.</pre>
</div>
</content>
</entry>
</feed>
