C++: Move some stuff from tests3.cpp to common tests.h

This commit is contained in:
Geoffrey White
2022-04-28 17:02:26 +01:00
parent 397efd1648
commit 4be3161891
2 changed files with 17 additions and 9 deletions

View File

@@ -12,3 +12,11 @@ public:
void setSecurityManager(SecurityManager *const manager);
void parse(const InputSource &data);
};
typedef unsigned int XMLCh;
class XMLUni
{
public:
static const XMLCh fgXercesDisableDefaultEntityResolution[];
};

View File

@@ -1,17 +1,9 @@
// test cases for rule CWE-611
// test cases for rule CWE-611 (SAX2XMLReader)
#include "tests.h"
// ---
typedef unsigned int XMLCh;
class XMLUni
{
public:
static const XMLCh fgXercesDisableDefaultEntityResolution[];
};
class SAX2XMLReader
{
public:
@@ -25,6 +17,14 @@ public:
static SAX2XMLReader *createXMLReader();
};
// ---
void test3_1(InputSource &data) {