]> granicus.if.org Git - clang/commit
[clang-format] Add missing test for std::function<void( int, int )>
authorDaniel Jasper <djasper@google.com>
Wed, 18 Mar 2015 12:59:19 +0000 (12:59 +0000)
committerDaniel Jasper <djasper@google.com>
Wed, 18 Mar 2015 12:59:19 +0000 (12:59 +0000)
commit2aea6562aa35f982dc65e14fd8e92cbfffb2f45a
treea9fe37700fcb6444a4bdc3f81a046be06b5d8fe7
parentdd1268ce8e9b56ded8322583e04bbb4d9b0f1eef
[clang-format] Add missing test for std::function<void( int, int )>
spacing also fixed by r230473.

The fix in r230473 was done to enable fixing the spacing for
  std::function<void( int, int )>.
I did not realized that it also fixed this
issue.  Since it is fairly different from
  Deleted &operator=(const Deleted &)& = default;
fixed in r230473, it seems sensible to add the regression test for it.

Also cleaned up the test by removing duplicated code and comment, and kept
repeated test set consistent.

Result of running the new tests with r230473 backed out:
  [ RUN      ] FormatTest.ConfigurableSpacesInParentheses
  Actual: "std::function<void(int, int)> callback;"
  Expected: "std::function<void( int, int )> callback;"
  Actual: "std::function<void( int, int )> callback;"
  Expected: "std::function<void(int, int)> callback;"
  Actual: "std::function<void( int, int ) > callback;"
  Expected: "std::function<void(int, int)> callback;"
  [  FAILED  ] FormatTest.ConfigurableSpacesInParentheses (402 ms)

Result of new tests with r230473:
  [ RUN      ] FormatTest.ConfigurableSpacesInParentheses
  [       OK ] FormatTest.ConfigurableSpacesInParentheses (209 ms)

Review: http://reviews.llvm.org/D7922

Patch by Jean-Philippe Dufraigne. Thanks!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@232632 91177308-0d34-0410-b5e6-96231b3b80d8
unittests/Format/FormatTest.cpp