Remove Spurious Blank Lines in PRT File Reports

The StreamLog::addMessageUnconditionally() member function will end
each message with a newline (std::endl) so we should not add such
newlines ourselves.  The extra newline characters produce spurious
blank lines in the report sheets, e.g., for the "PRODUCTION REPORT".

This commit removes the last newline character from each report
request, thus deferring that responsibility to OpmLog::note()
instead.  Doing so, however, means we have take a little more care
with the first line of each report lest we create report sheets
which are smushed together.
This commit is contained in:
Bård Skaflestad
2023-12-07 15:29:08 +01:00
parent 6b18cbafc6
commit ec549df37b
3 changed files with 24 additions and 20 deletions

View File

@@ -99,13 +99,13 @@ BOOST_AUTO_TEST_CASE(Cumulative)
: : : : : MSTB : MSTB : MMSCF : MRB : MSTB : MSTB : MMSCF : MRB :
====================================================================================================================================
: FIELD: : : : 1.0: 2.0: 3.0: 4.0: 5.0: 6.0: 7.0: 8.0:
:--------:-----------:--------:----:------------:----------:-----------:-----------:------------:----------:-----------:-----------:
:--------:-----------:--------:----:-----------:-----------:-----------:-----------:------------:----------:-----------:-----------:
: G1: : : : 9.0: 10.0: 11.0: 12.0: 13.0: 14.0: 15.0: 15.0:
:--------:-----------:--------:----:------------:----------:-----------:-----------:------------:----------:-----------:-----------:
:--------:-----------:--------:----:-----------:-----------:-----------:-----------:------------:----------:-----------:-----------:
: PROD: 10, 10: PROD:ORAT: 16.0: 17.0: 18.0: 19.0: 20.0: 21.0: 22.0: 23.0:
:--------:-----------:--------:----:------------:----------:-----------:-----------:------------:----------:-----------:-----------:
:--------:-----------:--------:----:-----------:-----------:-----------:-----------:------------:----------:-----------:-----------:
: INJ: 1, 1: INJ:GRAT: 24.0: 25.0: 26.0: 27.0: 28.0: 29.0: 30.0: 31.0:
:--------:-----------:--------:----:------------:----------:-----------:-----------:------------:----------:-----------:-----------:
:--------:-----------:--------:----:-----------:-----------:-----------:-----------:------------:----------:-----------:-----------:
)";
std::stringstream str;
@@ -335,11 +335,11 @@ BOOST_AUTO_TEST_CASE(Injection)
: : : OIL : WAT : GAS : STB/DAY : STB/DAY : MSCF/DAY : RB/DAY : PSIA : PSIA :
==============================================================================================================
: FIELD: : : : : 1.0: 2.0: 3.0: 4.0: : :
:--------:-----------:------:------:------:------------:----------:-----------:-----------:--------:--------:
:--------:-----------:------:------:------:-----------:-----------:-----------:-----------:--------:--------:
: G1: : : : : 5.0: 6.0: 7.0: 8.0: : :
:--------:-----------:------:------:------:------------:----------:-----------:-----------:--------:--------:
:--------:-----------:------:------:------:-----------:-----------:-----------:-----------:--------:--------:
: INJ: 1, 1: : : GRAT: 9.0: 10.0: 11.0: 12.0: 13.0: 14.0:
:--------:-----------:------:------:------:------------:----------:-----------:-----------:--------:--------:
:--------:-----------:------:------:------:-----------:-----------:-----------:-----------:--------:--------:
)";
std::stringstream str;