This is an archive of the discontinued LLVM Phabricator instance.

[libc++][NFC] Remove some of the code duplication in the string tests
ClosedPublic

Authored by philnik on Aug 14 2022, 5:05 AM.

Diff Detail

Event Timeline

philnik created this revision.Aug 14 2022, 5:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 14 2022, 5:05 AM
Herald added a subscriber: arphaman. · View Herald Transcript
philnik requested review of this revision.Aug 14 2022, 5:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 14 2022, 5:05 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
philnik updated this revision to Diff 452633.Aug 15 2022, 5:13 AM
  • Fix test
huixie90 accepted this revision as: huixie90.Aug 15 2022, 12:33 PM
huixie90 added a subscriber: huixie90.

LGTM

libcxx/test/std/strings/basic.string/string.modifiers/string_append/string.pass.cpp
59

In one place, I saw you changed from > 3 to >= 11. To be consistent, either change this one too or revert the other change.
I suppose this is checking the version is > Cxx03. I thought we need to use a different macro to check if the version is CXX03 in the non-test code and didn't know that this is working.

ldionne accepted this revision.Aug 26 2022, 7:17 AM

LGTM w/ comments.

libcxx/test/std/strings/basic.string/string.modifiers/string_append/string.pass.cpp
59

This is so weird, we should use TEST_STD_VER >= 11 everywhere. I didn't know we had TEST_STD_VER > 3 anywhere in the code base.

This revision is now accepted and ready to land.Aug 26 2022, 7:17 AM
philnik updated this revision to Diff 455931.Aug 26 2022, 8:48 AM
philnik marked 2 inline comments as done.
  • replace > 3 with >= 11 in the string tests
This revision was landed with ongoing or failed builds.Aug 26 2022, 12:58 PM
This revision was automatically updated to reflect the committed changes.