handles wip. not happy with const behavior

This commit is contained in:
Lee Thomason
2012-03-28 17:46:41 -07:00
parent 3ffdd39dbf
commit 5708f814a6
2 changed files with 24 additions and 8 deletions

View File

@@ -726,6 +726,22 @@ int main( int /*argc*/, const char ** /*argv*/ )
XMLTest( "Clone and Equal", 4, count );
}
// -------- Handles ------------
{
static const char* xml = "<element attrib='bar'><sub>Text</sub></element>";
XMLDocument doc;
doc.Parse( xml );
const XMLDocument& docC = doc;
XMLElement* ele = XMLHandle( doc ).FirstChildElement( "element" ).FirstChild().ToElement();
XMLTest( "Handle, success, mutable", ele->Value(), "sub" );
ele = XMLHandle( docC ).FirstChildElement( "element" ).FirstChild().ToElement();
XMLTest( "Handle, success, mutable", ele->Value(), "sub" );
}
// ----------- Performance tracking --------------
{
#if defined( _MSC_VER )