[libc-commits] [PATCH] D128908: [libc][utils] Add more methods to StringView

Clement Courbet via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Jun 30 06:27:06 PDT 2022


courbet added inline comments.


================
Comment at: libc/src/__support/CPP/StringView.h:22
 // This class will be extended as needed in future.
 class StringView {
 private:
----------------
@sivachandra Do we really want to keep duplicating the whole libc++ in there ? I can see why we can't use gtest to test the libc, but we should be able to use gtest to test individual internal components. Then we would not need to reimplement the world.

internal unit tests would test `__llvm_libc::CodeUnderTest` using the system libc and `gtest`
libc API tests would use the extern C `CodeUnderTest` build with `-ffrestanding` and using `llvm-libc` and `LibCTest`

Does that make sense ? At least for code that doe snot rely on `errno` and such weird things.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128908/new/

https://reviews.llvm.org/D128908



More information about the libc-commits mailing list