Skip to content

Commit a6407f0

Browse files
committed
C++: Extend the files test to cover the issue with XMLParent.
1 parent c4c1dfa commit a6407f0

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
| c.c | library-tests/files/c.c | CFile, MetricFile | C | | |
2-
| files1.cpp | library-tests/files/files1.cpp | CppFile, MetricFile | C++ | swap | t |
3-
| files1.h | library-tests/files/files1.h | HeaderFile, MetricFile | | swap | |
4-
| files2.cpp | library-tests/files/files2.cpp | CppFile, MetricFile | C++ | g | x, y |
1+
| c.c | library-tests/files/c.c | CFile, MetricFile | C, XMLParent | | |
2+
| files1.cpp | library-tests/files/files1.cpp | CppFile, MetricFile | C++, XMLParent | swap | t |
3+
| files1.h | library-tests/files/files1.h | HeaderFile, MetricFile | XMLParent | swap | |
4+
| files2.cpp | library-tests/files/files2.cpp | CppFile, MetricFile | C++, XMLParent | g | x, y |

cpp/ql/test/library-tests/files/Files.ql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ string describe(File f) {
66
or
77
f.compiledAsCpp() and
88
result = "C++"
9+
or
10+
f instanceof XMLParent and
11+
result = "XMLParent" // regression tests a bug in the constructor of XMLParent
912
}
1013

1114
from File f

0 commit comments

Comments
 (0)