[compiler-rt] [NFC][sanitizer] Add InternalScopedString::Append (PR #66559)
    Mitch Phillips via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Sep 15 17:41:39 PDT 2023
    
    
  
================
@@ -376,7 +376,25 @@ TEST(SanitizerCommon, RemoveANSIEscapeSequencesFromString) {
   }
 }
 
-TEST(SanitizerCommon, InternalScopedString) {
+TEST(SanitizerCommon, InternalScopedStringAppend) {
+  InternalScopedString str;
+  EXPECT_EQ(0U, str.length());
+  EXPECT_STREQ("", str.data());
+
----------------
hctim wrote:
nit: can you add another null-append here (checking that null-append to an empty string is also sane):
```
  str.Append("");
  EXPECT_EQ(0U, str.length());
  EXPECT_STREQ("", str.data());
```
https://github.com/llvm/llvm-project/pull/66559
    
    
More information about the llvm-commits
mailing list