mirror of
https://github.com/leethomason/tinyxml2.git
synced 2026-07-29 15:13:01 +04:00
ability to set bool write values
This commit is contained in:
+12
@@ -752,6 +752,18 @@ int main( int argc, const char ** argv )
|
||||
XMLTest("Attribute: bool", true, v, true);
|
||||
XMLTest("Attribute: bool", true, element->BoolAttribute("attrib"), true);
|
||||
}
|
||||
{
|
||||
element->SetAttribute("attrib", true);
|
||||
const char* result = element->Attribute("attrib");
|
||||
XMLTest("Bool true is 'true'", "true", result);
|
||||
|
||||
XMLUtil::SetBool("1", "0");
|
||||
element->SetAttribute("attrib", true);
|
||||
result = element->Attribute("attrib");
|
||||
XMLTest("Bool true is '1'", "1", result);
|
||||
|
||||
XMLUtil::SetBool(0, 0);
|
||||
}
|
||||
{
|
||||
element->SetAttribute("attrib", 100.0);
|
||||
double v = 0;
|
||||
|
||||
Reference in New Issue
Block a user