mirror of https://github.com/AxioDL/tinyxml2.git
renamed function, added test case
This commit is contained in:
parent
e01e786883
commit
48ea0bcf80
|
@ -1372,9 +1372,11 @@ public:
|
||||||
*/
|
*/
|
||||||
const char* CStr() const { return buffer.Mem(); }
|
const char* CStr() const { return buffer.Mem(); }
|
||||||
/**
|
/**
|
||||||
Return the size of the XML file in memory
|
If in print to memory mode, return the size
|
||||||
|
of the XML file in memory. (Note the size returned
|
||||||
|
includes the terminating null.)
|
||||||
*/
|
*/
|
||||||
const int SizeOfCStr()const{ return buffer.Size(); }
|
const int CStrSize()const{ return buffer.Size(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SealElement();
|
void SealElement();
|
||||||
|
|
|
@ -824,6 +824,7 @@ int main( int /*argc*/, const char ** /*argv*/ )
|
||||||
|
|
||||||
static const char* result = "\xef\xbb\xbf<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
|
static const char* result = "\xef\xbb\xbf<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
|
||||||
XMLTest( "BOM and default declaration", printer.CStr(), result, false );
|
XMLTest( "BOM and default declaration", printer.CStr(), result, false );
|
||||||
|
XMLTest( "CStrSize", printer.CStrSize(), 42, false );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue