mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-16 23:14:36 +00:00
Do not filter out diff nodes that are only in NOT_REDUNDANT_CATEGORY
* src/abg-comparison.cc (diff::is_filtered_out): If a diff not is only in the NOT_REDUNDANT_CATEGORY category consider it as not being filtered. * tests/data/test-diff-filter/test18-report.txt: New test input. * tests/data/test-diff-filter/test18-v0.cc: Source code for new test input. * tests/data/test-diff-filter/test18-v0.o: New test input. * tests/data/test-diff-filter/test18-v1.cc: Source code for new test input. * tests/data/test-diff-filter/test18-v1.o: New test input. * tests/Makefile.am: Add the new test inputs to the source distribution. * tests/test-diff-filter.cc: Run this test harness on the new test input above. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
parent
9936b7852b
commit
b75a020fb1
@ -793,6 +793,13 @@ diff::is_filtered_out() const
|
||||
if (context()->get_allowed_category() == EVERYTHING_CATEGORY)
|
||||
return false;
|
||||
|
||||
// If the diff node is only in the NOT_REDUNDANT_CATEGORY, that
|
||||
// means it represents a change that is not yet categorized and that
|
||||
// the diff not is not redundant. We definitely want to see that
|
||||
// diff node be reported.
|
||||
if (get_category() == NOT_REDUNDANT_CATEGORY)
|
||||
return false;
|
||||
|
||||
// We don't want to display redundant function or variable diff
|
||||
// nodes.
|
||||
if ((dynamic_cast<const function_decl_diff*>(this)
|
||||
|
@ -312,6 +312,11 @@ data/test-diff-filter/test17-v0.o \
|
||||
data/test-diff-filter/test17-v1.o \
|
||||
data/test-diff-filter/test17-0-report.txt \
|
||||
data/test-diff-filter/test17-1-report.txt \
|
||||
data/test-diff-filter/test18-v0.cc \
|
||||
data/test-diff-filter/test18-v1.cc \
|
||||
data/test-diff-filter/test18-v0.o \
|
||||
data/test-diff-filter/test18-v1.o \
|
||||
data/test-diff-filter/test18-report.txt \
|
||||
\
|
||||
data/test-lookup-syms/test0.cc \
|
||||
data/test-lookup-syms/test0.o \
|
||||
|
13
tests/data/test-diff-filter/test18-report.txt
Normal file
13
tests/data/test-diff-filter/test18-report.txt
Normal file
@ -0,0 +1,13 @@
|
||||
Functions changes summary: 0 Removed, 1 Changed, 0 Added function
|
||||
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
|
||||
|
||||
1 function with some indirect sub-type change:
|
||||
|
||||
[C]'function void foo(S&)' has some indirect sub-type changes:
|
||||
parameter 0 of type 'S&' has sub-type changes:
|
||||
in referenced type 'struct S':
|
||||
1 data member change:
|
||||
type of 'int S::m0' changed:
|
||||
name changed from 'int' to 'unsigned int'
|
||||
|
||||
|
9
tests/data/test-diff-filter/test18-v0.cc
Normal file
9
tests/data/test-diff-filter/test18-v0.cc
Normal file
@ -0,0 +1,9 @@
|
||||
struct S
|
||||
{
|
||||
int m0;
|
||||
char m1;
|
||||
};
|
||||
|
||||
void
|
||||
foo(S&)
|
||||
{}
|
BIN
tests/data/test-diff-filter/test18-v0.o
Normal file
BIN
tests/data/test-diff-filter/test18-v0.o
Normal file
Binary file not shown.
9
tests/data/test-diff-filter/test18-v1.cc
Normal file
9
tests/data/test-diff-filter/test18-v1.cc
Normal file
@ -0,0 +1,9 @@
|
||||
struct S
|
||||
{
|
||||
unsigned m0;
|
||||
char m1;
|
||||
};
|
||||
|
||||
void
|
||||
foo(S&)
|
||||
{}
|
BIN
tests/data/test-diff-filter/test18-v1.o
Normal file
BIN
tests/data/test-diff-filter/test18-v1.o
Normal file
Binary file not shown.
@ -208,6 +208,13 @@ InOutSpec in_out_specs[] =
|
||||
"data/test-diff-filter/test17-1-report.txt",
|
||||
"output/test-diff-filter/test17-1-report.txt",
|
||||
},
|
||||
{
|
||||
"data/test-diff-filter/test18-v0.o",
|
||||
"data/test-diff-filter/test18-v1.o",
|
||||
"",
|
||||
"data/test-diff-filter/test18-report.txt",
|
||||
"output/test-diff-filter/test18-report.txt",
|
||||
},
|
||||
// This should be the last entry
|
||||
{NULL, NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user