[PATCH] D118361: clang-format: [JS] sort import aliases.

Martin Probst via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 27 07:14:03 PST 2022


mprobst updated this revision to Diff 403646.
mprobst added a comment.

- make test break if we used alphasort


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118361

Files:
  clang/unittests/Format/SortImportsTestJS.cpp


Index: clang/unittests/Format/SortImportsTestJS.cpp
===================================================================
--- clang/unittests/Format/SortImportsTestJS.cpp
+++ clang/unittests/Format/SortImportsTestJS.cpp
@@ -450,17 +450,17 @@
   verifySort("import {B} from 'bar';\n"
              "import {A} from 'foo';\n"
              "\n"
-             "import C = A.C;\n"
-             "import Z = B.C.Z;\n"
+             "import Z = A.C;\n"
+             "import Y = B.C.Z;\n"
              "\n"
-             "export {C};\n"
+             "export {Z};\n"
              "\n"
              "console.log(Z);\n",
              "import {A} from 'foo';\n"
-             "import C = A.C;\n"
-             "export {C};\n"
+             "import Z = A.C;\n"
+             "export {Z};\n"
              "import {B} from 'bar';\n"
-             "import Z = B.C.Z;\n"
+             "import Y = B.C.Z;\n"
              "\n"
              "console.log(Z);\n");
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118361.403646.patch
Type: text/x-patch
Size: 954 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220127/6dcbcad3/attachment.bin>


More information about the cfe-commits mailing list