From bc6920b6815f81ad17b7152bc105156c756e8a67 Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Thu, 3 Aug 2017 18:46:31 +0300 Subject: [PATCH] Cleanup and simplify checks --- xmltest.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xmltest.cpp b/xmltest.cpp index 3fada04..f043599 100644 --- a/xmltest.cpp +++ b/xmltest.cpp @@ -1345,7 +1345,7 @@ int main( int argc, const char ** argv ) ele->DeleteAttribute( "attrib1" ); ele->DeleteAttribute( "attrib3" ); - XMLTest( "Attribute order (empty)", false, ele->FirstAttribute() ? true : false ); + XMLTest( "Attribute order (empty)", true, ele->FirstAttribute() == 0 ); } { @@ -1397,7 +1397,7 @@ int main( int argc, const char ** argv ) XMLHandle docH( doc ); ele = docH.FirstChildElement( "none" ).FirstChildElement( "element" ).ToElement(); - XMLTest( "Handle, dne, mutable", false, ele != 0 ); + XMLTest( "Handle, dne, mutable", true, ele == 0 ); } { @@ -1408,10 +1408,10 @@ int main( int argc, const char ** argv ) XMLConstHandle docH( doc ); const XMLElement* ele = docH.FirstChildElement( "element" ).FirstChild().ToElement(); - XMLTest( "Handle, success, const", ele->Value(), "sub" ); + XMLTest( "Handle, success, const", "sub", ele->Value() ); ele = docH.FirstChildElement( "none" ).FirstChildElement( "element" ).ToElement(); - XMLTest( "Handle, dne, const", false, ele != 0 ); + XMLTest( "Handle, dne, const", true, ele == 0 ); } { // Default Declaration & BOM