From e399236be3482e945afaa12ab6acc05a9eb1bb77 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 18 Sep 2013 11:23:47 +0200 Subject: Improve C++ indenter by handling '},' sequence --- tests/compiler/cxx-indenter/driver.cxx | 5 +++++ tests/compiler/cxx-indenter/output.std | 15 +++++++++++++++ 2 files changed, 20 insertions(+) (limited to 'tests/compiler') diff --git a/tests/compiler/cxx-indenter/driver.cxx b/tests/compiler/cxx-indenter/driver.cxx index 511b6d4..665c6ab 100644 --- a/tests/compiler/cxx-indenter/driver.cxx +++ b/tests/compiler/cxx-indenter/driver.cxx @@ -115,6 +115,11 @@ main () << "\"'name')\");" << "}"; + os << "namespace N" + << "{" + << "static int i[] = {{0,\n0},{1,\n1}};" + << "}"; + /* @@ TODO: still misindents (if-else association problem) diff --git a/tests/compiler/cxx-indenter/output.std b/tests/compiler/cxx-indenter/output.std index 0e59a26..79e74f4 100644 --- a/tests/compiler/cxx-indenter/output.std +++ b/tests/compiler/cxx-indenter/output.std @@ -86,3 +86,18 @@ while (false); "'name')"); } +namespace N +{ + static int i[] = + { + { + 0, + 0 + }, + { + 1, + 1 + } + }; +} + -- cgit v1.1