[PATCH 6/7] abidiff: Eliminate leaf mode double blank lines.
Giuliano Procida
gprocida@google.com
Fri Mar 27 14:00:16 GMT 2020
In --leaf-changes-only mode, the report currently has 2 blank lines
after each type-diff section. This patches changes this to 1.
* src/abg-leaf-reporter.cc: (report_diffs) Emit 1 instead of 2
new lines between sections.
* tests/data/test-abidiff-exit/test-leaf-peeling-report.txt:
Replace double blank lines with single ones.
* tests/data/test-diff-filter/libtest45-basic-type-change-report-1.txt:
Ditto.
* tests/data/test-diff-suppr/test36-leaf-report-0.txt: Ditto.
* tests/data/test-*/test*report*.txt:: Ditto.
Signed-off-by: Giuliano Procida <gprocida@google.com>
---
src/abg-leaf-reporter.cc | 2 +-
tests/data/test-abidiff-exit/test-leaf-peeling-report.txt | 3 ---
.../test-diff-filter/libtest45-basic-type-change-report-1.txt | 2 --
tests/data/test-diff-suppr/test36-leaf-report-0.txt | 1 -
4 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/src/abg-leaf-reporter.cc b/src/abg-leaf-reporter.cc
index a3c96432..16e8f365 100644
--- a/src/abg-leaf-reporter.cc
+++ b/src/abg-leaf-reporter.cc
@@ -74,7 +74,7 @@ report_diffs(const reporter_base& r,
if (r.diff_to_be_reported((*i)->get_canonical_diff()))
{
if (started_to_emit)
- out << "\n\n";
+ out << "\n";
string n = (*i)->first_subject()->get_pretty_representation();
diff --git a/tests/data/test-abidiff-exit/test-leaf-peeling-report.txt b/tests/data/test-abidiff-exit/test-leaf-peeling-report.txt
index c2e5e0fb..4d7d5754 100644
--- a/tests/data/test-abidiff-exit/test-leaf-peeling-report.txt
+++ b/tests/data/test-abidiff-exit/test-leaf-peeling-report.txt
@@ -11,20 +11,17 @@ Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable
type size changed from 32 to 64 (in bits)
and size changed from 32 to 64 (in bits) (by +32 bits)
-
'struct ops1 at test-leaf-peeling.0.cc:5:1' changed:
type size hasn't changed
there are data member changes:
type 'int*' of 'ops1::x' changed:
pointer type changed from: 'int*' to: 'int**'
-
'struct ops2 at test-leaf-peeling.0.cc:9:1' changed:
type size changed from 320 to 640 (in bits)
there are data member changes:
'foo ops2::y[10]' size changed from 320 to 640 (in bits) (by +320 bits)
-
'struct ops3 at test-leaf-peeling.0.cc:13:1' changed:
type size hasn't changed
there are data member changes:
diff --git a/tests/data/test-diff-filter/libtest45-basic-type-change-report-1.txt b/tests/data/test-diff-filter/libtest45-basic-type-change-report-1.txt
index eecb84a0..3bea50c9 100644
--- a/tests/data/test-diff-filter/libtest45-basic-type-change-report-1.txt
+++ b/tests/data/test-diff-filter/libtest45-basic-type-change-report-1.txt
@@ -28,14 +28,12 @@ Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable
type 'int*' of 'S0::m0' changed:
pointer type changed from: 'int*' to: 'char*'
-
'struct S1 at test45-basic-type-change-v0.cc:13:1' changed:
type size hasn't changed
there are data member changes:
type 'int*' of 'S1::m0' changed:
pointer type changed from: 'int*' to: 'char*'
-
'struct S2 at test45-basic-type-change-v0.cc:18:1' changed:
type size hasn't changed
there are data member changes:
diff --git a/tests/data/test-diff-suppr/test36-leaf-report-0.txt b/tests/data/test-diff-suppr/test36-leaf-report-0.txt
index 92de4df4..d270740d 100644
--- a/tests/data/test-diff-suppr/test36-leaf-report-0.txt
+++ b/tests/data/test-diff-suppr/test36-leaf-report-0.txt
@@ -12,7 +12,6 @@ Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable
function void interface2(struct_type&)
function void interface3(struct_type**)
-
'struct leaf2 at test36-leaf-v0.cc:9:1' changed:
type size changed from 64 to 96 (in bits)
there are data member changes:
--
2.25.1.696.g5e7596f4ac-goog
More information about the Libabigail
mailing list