mirror of
https://github.com/jezhiggins/arabica
synced 2024-12-25 21:58:21 +01:00
Corrected SAX tests for std::unique_ptr change
This commit is contained in:
parent
c4713e9a7b
commit
127cc8bac1
2 changed files with 6 additions and 6 deletions
|
@ -125,11 +125,11 @@ class WhitespaceStripperTest : public TestCase
|
||||||
} // testStrip
|
} // testStrip
|
||||||
|
|
||||||
private:
|
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;
|
(*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
|
} // source
|
||||||
}; // WhitespaceStripperTest
|
}; // WhitespaceStripperTest
|
||||||
|
|
||||||
|
|
|
@ -35,11 +35,11 @@ class TaggleTest : public TestCase
|
||||||
} // senseTest
|
} // senseTest
|
||||||
|
|
||||||
private:
|
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;
|
(*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
|
} // source
|
||||||
}; // TaggleTest
|
}; // TaggleTest
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue