mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3910 Add compdat export test with 132 line length and 133 line length.
This commit is contained in:
@@ -145,7 +145,7 @@ void RifEclipseDataTableFormatter::outputBuffer()
|
|||||||
else if (line.lineType == CONTENTS)
|
else if (line.lineType == CONTENTS)
|
||||||
{
|
{
|
||||||
QString lineText = m_tableRowPrependText;
|
QString lineText = m_tableRowPrependText;
|
||||||
QString appendText = (line.appendTextSet ? line.appendText : m_tableRowAppendText) + "\n";
|
QString appendText = (line.appendTextSet ? line.appendText : m_tableRowAppendText);
|
||||||
|
|
||||||
for (size_t i = 0; i < line.data.size(); ++i)
|
for (size_t i = 0; i < line.data.size(); ++i)
|
||||||
{
|
{
|
||||||
@@ -163,7 +163,7 @@ void RifEclipseDataTableFormatter::outputBuffer()
|
|||||||
lineText += column;
|
lineText += column;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_out << lineText << appendText;
|
m_out << lineText << appendText << "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_columns.clear();
|
m_columns.clear();
|
||||||
|
|||||||
@@ -110,11 +110,11 @@ TEST(RifEclipseDataTableFormatter, LongLine)
|
|||||||
|
|
||||||
formatter.rowCompleted();
|
formatter.rowCompleted();
|
||||||
formatter.tableCompleted();
|
formatter.tableCompleted();
|
||||||
std::cout << tableText.toStdString() << std::endl;
|
|
||||||
|
|
||||||
QStringList tableLines = tableText.split(QRegExp("[\r\n]"), QString::SkipEmptyParts);
|
QStringList tableLines = tableText.split(QRegExp("[\r\n]"), QString::SkipEmptyParts);
|
||||||
for (QString line : tableLines)
|
for (QString line : tableLines)
|
||||||
{
|
{
|
||||||
|
std::cout << QString("Line: \"%1\"").arg(line).toStdString() << std::endl;
|
||||||
if (!line.startsWith(formatter.commentPrefix()))
|
if (!line.startsWith(formatter.commentPrefix()))
|
||||||
{
|
{
|
||||||
EXPECT_LE(line.length(), RifEclipseDataTableFormatter::maxEclipseRowWidth());
|
EXPECT_LE(line.length(), RifEclipseDataTableFormatter::maxEclipseRowWidth());
|
||||||
@@ -141,8 +141,8 @@ TEST(RifEclipseDataTableFormatter, LongLine132)
|
|||||||
};
|
};
|
||||||
|
|
||||||
formatter.header(header);
|
formatter.header(header);
|
||||||
QString fiftyCharacterWellName = "01234567890";
|
QString tenCharacterWellName = "0123456789";
|
||||||
formatter.add(fiftyCharacterWellName);
|
formatter.add(tenCharacterWellName);
|
||||||
for (int i = 0; i < 7; ++i)
|
for (int i = 0; i < 7; ++i)
|
||||||
{
|
{
|
||||||
formatter.add(std::numeric_limits<int>::max()); // 10 characters
|
formatter.add(std::numeric_limits<int>::max()); // 10 characters
|
||||||
@@ -157,11 +157,11 @@ TEST(RifEclipseDataTableFormatter, LongLine132)
|
|||||||
|
|
||||||
formatter.rowCompleted();
|
formatter.rowCompleted();
|
||||||
formatter.tableCompleted();
|
formatter.tableCompleted();
|
||||||
std::cout << tableText.toStdString() << std::endl;
|
|
||||||
|
|
||||||
QStringList tableLines = tableText.split(QRegExp("[\r\n]"), QString::SkipEmptyParts);
|
QStringList tableLines = tableText.split(QRegExp("[\r\n]"), QString::SkipEmptyParts);
|
||||||
for (QString line : tableLines)
|
for (QString line : tableLines)
|
||||||
{
|
{
|
||||||
|
std::cout << QString("Line: \"%1\"").arg(line).toStdString() << std::endl;
|
||||||
if (line.startsWith("0"))
|
if (line.startsWith("0"))
|
||||||
{
|
{
|
||||||
EXPECT_EQ(line.length(), RifEclipseDataTableFormatter::maxEclipseRowWidth());
|
EXPECT_EQ(line.length(), RifEclipseDataTableFormatter::maxEclipseRowWidth());
|
||||||
@@ -188,7 +188,7 @@ TEST(RifEclipseDataTableFormatter, LongLine133)
|
|||||||
};
|
};
|
||||||
|
|
||||||
formatter.header(header);
|
formatter.header(header);
|
||||||
QString fiftyCharacterWellName = "01234567890";
|
QString fiftyCharacterWellName = "0123456789";
|
||||||
formatter.add(fiftyCharacterWellName);
|
formatter.add(fiftyCharacterWellName);
|
||||||
for (int i = 0; i < 7; ++i)
|
for (int i = 0; i < 7; ++i)
|
||||||
{
|
{
|
||||||
@@ -204,11 +204,11 @@ TEST(RifEclipseDataTableFormatter, LongLine133)
|
|||||||
|
|
||||||
formatter.rowCompleted();
|
formatter.rowCompleted();
|
||||||
formatter.tableCompleted();
|
formatter.tableCompleted();
|
||||||
std::cout << tableText.toStdString() << std::endl;
|
|
||||||
|
|
||||||
QStringList tableLines = tableText.split(QRegExp("[\r\n]"), QString::SkipEmptyParts);
|
QStringList tableLines = tableText.split(QRegExp("[\r\n]"), QString::SkipEmptyParts);
|
||||||
for (QString line : tableLines)
|
for (QString line : tableLines)
|
||||||
{
|
{
|
||||||
|
std::cout << QString("Line: \"%1\"").arg(line).toStdString() << std::endl;
|
||||||
if (line.startsWith("0"))
|
if (line.startsWith("0"))
|
||||||
{
|
{
|
||||||
EXPECT_LE(line.length(), RifEclipseDataTableFormatter::maxEclipseRowWidth());
|
EXPECT_LE(line.length(), RifEclipseDataTableFormatter::maxEclipseRowWidth());
|
||||||
|
|||||||
Reference in New Issue
Block a user