Previously, the integer_to_string tests used EXPECT_TRUE(.equals)
which doesn't have useful error messages. Now they properly check
equality with the EXPECT_EQ macro, which allows for comparing the
strings more naturally.
Details
Details
- Reviewers
sivachandra - Commits
- rG5dd855342390: [libc] Support StringView equality tests
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM but will this cause problems to FuchsiaTest: https://github.com/llvm/llvm-project/blob/main/libc/utils/UnitTest/FuchsiaTest.h
Comment Actions
This will be fine there as long as __llvm_libc::cpp::StringView has an operator==. Though as a drive by comment here, I think the better way to compare StringView's would be to make sure they have an operator const char *() and just use EXPECT_STREQ
Comment Actions
I would guess the potential problem would be in describeValue since fuchsia might not know how to convert a StringView into a std::string for display