summaryrefslogtreecommitdiffstats
path: root/tools/gn/command_format_unittest.cc
diff options
context:
space:
mode:
authorscottmg <scottmg@chromium.org>2014-10-01 19:05:57 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-02 02:06:11 +0000
commit8a4459122520cd7d59be4f3b03a2a7eb74344a71 (patch)
tree78bb23ab28ffa598357dc0a3526afb7e8cc6539d /tools/gn/command_format_unittest.cc
parent5689fdb4d43581749d0071e5dbf417b782424520 (diff)
downloadchromium_src-8a4459122520cd7d59be4f3b03a2a7eb74344a71.zip
chromium_src-8a4459122520cd7d59be4f3b03a2a7eb74344a71.tar.gz
chromium_src-8a4459122520cd7d59be4f3b03a2a7eb74344a71.tar.bz2
gn format: add call wrapping
For function call arguments: - if all arguments plus ')' fit at current point, insert - if all arguments fit at current, one per line - otherwise at minimum of current and margin+4, one per line, recurse into children. Similar for binary expressions so that "a + b" can wrap. Also, add basic output of AccessorNode + test. (not as fancy as clang-format, but there's not that many long function calls in .gn files.) R=brettw@chromium.org BUG=348474 Review URL: https://codereview.chromium.org/607243002 Cr-Commit-Position: refs/heads/master@{#297765}
Diffstat (limited to 'tools/gn/command_format_unittest.cc')
-rw-r--r--tools/gn/command_format_unittest.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/gn/command_format_unittest.cc b/tools/gn/command_format_unittest.cc
index bb9c6fd..0605429 100644
--- a/tools/gn/command_format_unittest.cc
+++ b/tools/gn/command_format_unittest.cc
@@ -49,3 +49,5 @@ FORMAT_TEST(017)
FORMAT_TEST(018)
FORMAT_TEST(019)
FORMAT_TEST(020)
+FORMAT_TEST(021)
+FORMAT_TEST(022)