Skip to content

Commit 4be3161

Browse files
committed
C++: Move some stuff from tests3.cpp to common tests.h
1 parent 397efd1 commit 4be3161

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

cpp/ql/test/query-tests/Security/CWE/CWE-611/tests.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,11 @@ class AbstractDOMParser {
1212
void setSecurityManager(SecurityManager *const manager);
1313
void parse(const InputSource &data);
1414
};
15+
16+
typedef unsigned int XMLCh;
17+
18+
class XMLUni
19+
{
20+
public:
21+
static const XMLCh fgXercesDisableDefaultEntityResolution[];
22+
};

cpp/ql/test/query-tests/Security/CWE/CWE-611/tests3.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
1-
// test cases for rule CWE-611
1+
// test cases for rule CWE-611 (SAX2XMLReader)
22

33
#include "tests.h"
44

55
// ---
66

7-
typedef unsigned int XMLCh;
8-
9-
class XMLUni
10-
{
11-
public:
12-
static const XMLCh fgXercesDisableDefaultEntityResolution[];
13-
};
14-
157
class SAX2XMLReader
168
{
179
public:
@@ -25,6 +17,14 @@ class XMLReaderFactory
2517
static SAX2XMLReader *createXMLReader();
2618
};
2719

20+
21+
22+
23+
24+
25+
26+
27+
2828
// ---
2929

3030
void test3_1(InputSource &data) {

0 commit comments

Comments
 (0)