Skip to content

Commit

Permalink
use AutoPtr - better code example, kill unnec Poco headers, re #10637
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeMPouzols committed Mar 30, 2015
1 parent 8e2b160 commit 069e211
Showing 1 changed file with 5 additions and 9 deletions.
@@ -1,14 +1,10 @@
#ifndef AFFINE_MATRIX_PARAMETER_PARSER_TEST_H
#define AFFINE_MATRIX_PARAMETER_PARSER_TEST_H

#include <Poco/DOM/AutoPtr.h>
#include <Poco/DOM/DOMParser.h>
#include <Poco/DOM/Document.h>
#include <Poco/DOM/Element.h>
#include <Poco/DOM/NodeList.h>
#include <Poco/DOM/NodeIterator.h>
#include <Poco/DOM/NodeFilter.h>
#include <Poco/File.h>
#include <Poco/Path.h>

#include <cxxtest/TestSuite.h>
#include "MantidMDEvents/AffineMatrixParameterParser.h"
Expand All @@ -23,7 +19,7 @@ class AffineMatrixParameterParserTest : public CxxTest::TestSuite
{
Poco::XML::DOMParser pParser;
std::string xmlToParse = "<?xml version=\"1.0\" encoding=\"utf-8\"?><Parameter><Type>AffineMatrixParameter</Type><Value>1,2;3,4;5,6</Value></Parameter>";
Poco::XML::Document* pDoc = pParser.parseString(xmlToParse);
Poco::AutoPtr<Poco::XML::Document> pDoc = pParser.parseString(xmlToParse);
Poco::XML::Element* pRootElem = pDoc->documentElement();

AffineMatrixParameterParser parser;
Expand All @@ -46,7 +42,7 @@ class AffineMatrixParameterParserTest : public CxxTest::TestSuite
{
Poco::XML::DOMParser pParser;
std::string xmlToParse = "<?xml version=\"1.0\" encoding=\"utf-8\"?><Parameter><Type>AffineMatrixParameter</Type><Value>1,2,3;4,5,6;7,8,9</Value></Parameter>";
Poco::XML::Document* pDoc = pParser.parseString(xmlToParse);
Poco::AutoPtr<Poco::XML::Document> pDoc = pParser.parseString(xmlToParse);
Poco::XML::Element* pRootElem = pDoc->documentElement();

AffineMatrixParameterParser parser;
Expand All @@ -72,7 +68,7 @@ class AffineMatrixParameterParserTest : public CxxTest::TestSuite
{
Poco::XML::DOMParser pParser;
std::string xmlToParse = "<?xml version=\"1.0\" encoding=\"utf-8\"?><Parameter><Type>AffineMatrixParameter</Type><Value>1,2,3,4;5,6,7,8;9,10,11,12</Value></Parameter>";
Poco::XML::Document* pDoc = pParser.parseString(xmlToParse);
Poco::AutoPtr<Poco::XML::Document> pDoc = pParser.parseString(xmlToParse);
Poco::XML::Element* pRootElem = pDoc->documentElement();

AffineMatrixParameterParser parser;
Expand Down Expand Up @@ -108,7 +104,7 @@ class AffineMatrixParameterParserTest : public CxxTest::TestSuite
{
Poco::XML::DOMParser pParser;
std::string xmlToParse = "<?xml version=\"1.0\" encoding=\"utf-8\"?><Parameter><Type>SOME_OTHER_PARAMETER_TYPE</Type><Value></Value></Parameter>";
Poco::XML::Document* pDoc = pParser.parseString(xmlToParse);
Poco::AutoPtr<Poco::XML::Document> pDoc = pParser.parseString(xmlToParse);
Poco::XML::Element* pRootElem = pDoc->documentElement();

AffineMatrixParameterParser parser;
Expand Down

0 comments on commit 069e211

Please sign in to comment.