[all-commits] [llvm/llvm-project] cc623d: [libc][test] Add EXPECT_STREQ and ASSERT_STREQ mac...

Pavel Labath via All-commits all-commits at lists.llvm.org
Thu Jul 30 06:46:24 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cc623d6e991ffbcf85fe5b7bc637d9070eee0015
      https://github.com/llvm/llvm-project/commit/cc623d6e991ffbcf85fe5b7bc637d9070eee0015
  Author: Pavel Labath <pavel at labath.sk>
  Date:   2026-07-30 (Thu, 30 Jul 2026)

  Changed paths:
    M libc/test/IntegrationTest/CMakeLists.txt
    M libc/test/IntegrationTest/test.h
    M libc/test/integration/src/pthread/pthread_name_test.cpp
    M libc/test/integration/src/stdio/sprintf_size_test.cpp
    M libc/test/integration/src/stdlib/CMakeLists.txt
    M libc/test/integration/src/stdlib/getenv_test.cpp
    M libc/test/integration/src/stdlib/putenv_test.cpp
    M libc/test/integration/src/stdlib/setenv_test.cpp
    M libc/test/integration/src/stdlib/unsetenv_test.cpp
    M libc/test/integration/startup/gpu/args_test.cpp
    M libc/test/integration/startup/linux/args_test.cpp

  Log Message:
  -----------
  [libc][test] Add EXPECT_STREQ and ASSERT_STREQ macros for integration tests (#212729)

Add EXPECT_STREQ and ASSERT_STREQ macros to IntegrationTest/test.h using
cpp::string_view. Note that, unlike the unit test macro (but like
googletest), this version treats NULL as distinct from "". The
inconsistency is unfortunate, but I think it's important as the code is
used for testing functions like getenv(), where "" and NULL have very
different meanings.

We should probably follow this up with a change to make the unit test
macro behave the same way.

Update integration tests to use the new macros instead of handrolled
string equality functions (my_streq), strcmp, inline_strcmp, or
string_view wrappers.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list