Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / onlinehelp / tests / helpformat.cpp
index 74a77b7aa780334fd1b4d73acf3880a11ef4aed0..797593e6b899116ce3be98d93d914d508c279996 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
  * \author Teemu Murtola <teemu.murtola@gmail.com>
  * \ingroup module_onlinehelp
  */
-#include <gtest/gtest.h>
+#include "gmxpre.h"
 
 #include "gromacs/onlinehelp/helpformat.h"
 
+#include <gtest/gtest.h>
+
 #include "testutils/stringtest.h"
 
 namespace
@@ -135,6 +137,12 @@ TEST_F(TextTableFormatterTest, HandlesOverflowingLines)
     formatter_.setColumnFirstLineOffset(2, 2);
     formatter_.addColumnLine(3, g_wrapText2);
     checkText(formatter_.formatRow(), "FormattedRow3");
+    // Test a case where a column value overflows even the next column.
+    formatter_.addColumnLine(0, "foobarfoobar");
+    formatter_.addColumnLine(1, "barfoobarfoo");
+    formatter_.addColumnLine(2, g_wrapText);
+    formatter_.addColumnLine(3, g_wrapText2);
+    checkText(formatter_.formatRow(), "FormattedRow4");
 }
 
 TEST_F(TextTableFormatterTest, HandlesLastColumnFolding)