File tree Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -482,9 +482,9 @@ LOGUNIT_CLASS(XMLLayoutTest)
482
482
encoder->encode (html, iter, buf);
483
483
LOGUNIT_ASSERT (iter == html.end ());
484
484
buf.flip ();
485
- apr_xml_parser* parser = apr_xml_parser_create (p.getAPRPool ());
485
+ auto parser = apr_xml_parser_create (p.getAPRPool ());
486
486
LOGUNIT_ASSERT (parser != 0 );
487
- apr_status_t stat = apr_xml_parser_feed (parser, buf.data (), buf.remaining ());
487
+ auto stat = apr_xml_parser_feed (parser, buf.data (), buf.remaining ());
488
488
LOGUNIT_ASSERT (stat == APR_SUCCESS);
489
489
apr_xml_doc* doc = 0 ;
490
490
stat = apr_xml_parser_done (parser, &doc);
@@ -494,19 +494,11 @@ LOGUNIT_CLASS(XMLLayoutTest)
494
494
495
495
int childElementCount = 0 ;
496
496
for ( auto node = parsedResult->first_child
497
- ; node != NULL
498
- ; node = node->next )
497
+ ; node != NULL
498
+ ; node = node->next )
499
499
{
500
500
childElementCount++;
501
-
502
- switch (childElementCount)
503
- {
504
- case 1 :
505
- LOGUNIT_ASSERT_EQUAL (std::string (" tr" ), std::string (node->name ));
506
- break ;
507
- default :
508
- break ;
509
- }
501
+ LOGUNIT_ASSERT_EQUAL (std::string (" tr" ), std::string (node->name ));
510
502
}
511
503
LOGUNIT_ASSERT (1 < childElementCount);
512
504
}
You can’t perform that action at this time.
0 commit comments