[clang] 8c681a9 - [clang-format][NFC] Add a TypeScript test case

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Sat Dec 14 19:42:51 PST 2024


Author: Owen Pan
Date: 2024-12-14T19:42:43-08:00
New Revision: 8c681a929b8684f5a4ad2ebd4e3e4f20036a9595

URL: https://github.com/llvm/llvm-project/commit/8c681a929b8684f5a4ad2ebd4e3e4f20036a9595
DIFF: https://github.com/llvm/llvm-project/commit/8c681a929b8684f5a4ad2ebd4e3e4f20036a9595.diff

LOG: [clang-format][NFC] Add a TypeScript test case

See #108530.

Added: 
    

Modified: 
    clang/unittests/Format/FormatTestJS.cpp

Removed: 
    


################################################################################
diff  --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp
index 4b15e7b7da3393..663b00ca7af628 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -1753,6 +1753,10 @@ TEST_F(FormatTestJS, ClassDeclarations) {
                "  x: {y: Z;} = {};\n"
                "  private y: {y: Z;} = {};\n"
                "}");
+  verifyFormat("class Foo {\n"
+               "  private addGrammarCheckOneboxProductInfo(\n"
+               "      productInfo: {[key: string]: string;}) {}\n"
+               "}");
 
   // ':' is not a type declaration here.
   verifyFormat("class X {\n"


        


More information about the cfe-commits mailing list