Commit 17c4f8b2eaa6b368629ef58a44f6b202ac38db76
1 parent
5e5bd2d0
Remove Cstyle casts.
Showing
1 changed file
with
12 additions
and
10 deletions
test/test_GXml.cpp
| ... | ... | @@ -232,10 +232,10 @@ void TestGXml::test_GXml_construct(void) |
| 232 | 232 | " value=\"0.02754520844\"")); |
| 233 | 233 | spec->append(new GXmlElement("parameter free=\"1\" max=\"5\" min=\"-5\"" |
| 234 | 234 | " name=\"Index1\" scale=\"1\" value=\"-2.0458781\"")); |
| 235 | - GXmlElement* par = (GXmlElement*)spec->element("parameter", 0); | |
| 235 | + GXmlElement* par = static_cast<GXmlElement*>(spec->element("parameter", 0)); | |
| 236 | 236 | par->attribute("value", "1.01"); |
| 237 | 237 | par->attribute("error", "3.145"); |
| 238 | - par = (GXmlElement*)spec->element("parameter", 1); | |
| 238 | + par = static_cast<GXmlElement*>(spec->element("parameter", 1)); | |
| 239 | 239 | par->attribute("value", "-2.100"); |
| 240 | 240 | par->attribute("error", "9.876"); |
| 241 | 241 | src->append(new GXmlElement("spatialModel file=\"LMC.fits\" type=\"SpatialMap\"")); |
| ... | ... | @@ -307,29 +307,31 @@ void TestGXml::test_GXml_access(void) |
| 307 | 307 | GXml xml; |
| 308 | 308 | xml.load(m_xml_file); |
| 309 | 309 | test_assert(xml.children() == 3, |
| 310 | - "Test if xml.children()==3", | |
| 311 | - "Unexpected number of children in document "+str(xml.children())); | |
| 310 | + "Test if xml.children()==3", | |
| 311 | + "Unexpected number of children in document "+str(xml.children())); | |
| 312 | 312 | |
| 313 | 313 | // Test node access |
| 314 | 314 | for (int i = 0; i < xml.children(); ++i) { |
| 315 | 315 | GXmlNode* ptr = xml.child(i); |
| 316 | 316 | } |
| 317 | 317 | test_assert(xml.elements() == 1, |
| 318 | - "Test if xml.elements()==1", | |
| 319 | - "Unexpected number of child elements in document "+str(xml.elements())); | |
| 318 | + "Test if xml.elements()==1", | |
| 319 | + "Unexpected number of child elements in document "+str(xml.elements())); | |
| 320 | 320 | |
| 321 | 321 | // Test node access |
| 322 | 322 | for (int i = 0; i < xml.elements(); ++i) { |
| 323 | 323 | GXmlNode* ptr = xml.element(i); |
| 324 | 324 | } |
| 325 | - test_assert( xml.elements("source_library") == 1, | |
| 326 | - "Test if the source_library = 1", | |
| 327 | - "Unexpected number of child elements in document "+str(xml.elements("source_library"))); | |
| 325 | + test_assert(xml.elements("source_library") == 1, | |
| 326 | + "Test if the source_library = 1", | |
| 327 | + "Unexpected number of child elements in document "+str(xml.elements("source_library"))); | |
| 328 | 328 | |
| 329 | 329 | // Test element access |
| 330 | 330 | for (int i = 0; i < xml.elements("source_library"); ++i) { |
| 331 | 331 | GXmlElement* ptr = xml.element("source_library", i); |
| 332 | - test_assert(ptr->name() == "source_library","Test name","Unexpected element name "+ptr->name()); | |
| 332 | + test_assert(ptr->name() == "source_library", | |
| 333 | + "Test name", | |
| 334 | + "Unexpected element name "+ptr->name()); | |
| 333 | 335 | } |
| 334 | 336 | |
| 335 | 337 | ... | ... |