Corrected SAX tests for std::unique_ptr change

This commit is contained in:
Jez Higgins 2020-04-16 00:06:30 +01:00
parent c4713e9a7b
commit 127cc8bac1
2 changed files with 6 additions and 6 deletions

View file

@ -125,11 +125,11 @@ class WhitespaceStripperTest : public TestCase
} // testStrip
private:
std::auto_ptr<Arabica::SAX::InputSource<std::string> > source(const std::string& str)
std::unique_ptr<Arabica::SAX::InputSource<std::string> > source(const std::string& str)
{
std::auto_ptr<std::iostream> ss(new std::stringstream());
std::unique_ptr<std::iostream> ss(new std::stringstream());
(*ss) << str;
return std::auto_ptr<Arabica::SAX::InputSource<std::string> >(new Arabica::SAX::InputSource<std::string>(ss));
return std::make_unique<Arabica::SAX::InputSource<std::string>>(std::move(ss));
} // source
}; // WhitespaceStripperTest

View file

@ -35,11 +35,11 @@ class TaggleTest : public TestCase
} // senseTest
private:
std::auto_ptr<Arabica::SAX::InputSource<std::string> > source(const std::string& str)
std::unique_ptr<Arabica::SAX::InputSource<std::string> > source(const std::string& str)
{
std::auto_ptr<std::iostream> ss(new std::stringstream());
std::unique_ptr<std::iostream> ss(new std::stringstream());
(*ss) << str;
return std::auto_ptr<Arabica::SAX::InputSource<std::string> >(new Arabica::SAX::InputSource<std::string>(ss));
return std::make_unique<Arabica::SAX::InputSource<std::string>>(std::move(ss));
} // source
}; // TaggleTest