renamed function, added test case

This commit is contained in:
Lee Thomason (grinliz) 2012-05-26 14:41:14 -07:00
parent e01e786883
commit 48ea0bcf80
2 changed files with 5 additions and 2 deletions

View File

@ -1372,9 +1372,11 @@ public:
*/
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:
void SealElement();

View File

@ -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\"?>";
XMLTest( "BOM and default declaration", printer.CStr(), result, false );
XMLTest( "CStrSize", printer.CStrSize(), 42, false );
}