1
0
Fork 0
mirror of https://github.com/KingDuckZ/kamokan.git synced 2024-12-27 21:35:41 +00:00

Replace string_ref with string_view in test.

This commit is contained in:
King_DuckZ 2017-06-07 00:18:52 +01:00
parent befbed413a
commit eaf8c0778d
2 changed files with 6 additions and 6 deletions

View file

@ -41,9 +41,9 @@ namespace tawashi {
} }
Storage::SubmissionResult FakeStorage::submit_pastie ( Storage::SubmissionResult FakeStorage::submit_pastie (
const boost::string_ref& parText, const boost::string_view& parText,
uint32_t parExpiry, uint32_t parExpiry,
const boost::string_ref& parLang, const boost::string_view& parLang,
const std::string& parRemoteIP const std::string& parRemoteIP
) const { ) const {
SubmittedPastie pastie; SubmittedPastie pastie;
@ -60,7 +60,7 @@ namespace tawashi {
return submission_res; return submission_res;
} }
boost::optional<std::string> FakeStorage::retrieve_pastie (const boost::string_ref& parToken) const { boost::optional<std::string> FakeStorage::retrieve_pastie (const boost::string_view& parToken) const {
auto it_found = std::find_if( auto it_found = std::find_if(
m_submitted_pasties.begin(), m_submitted_pasties.begin(),
m_submitted_pasties.end(), m_submitted_pasties.end(),

View file

@ -44,13 +44,13 @@ namespace tawashi {
tawashi_virtual_testing bool is_connected() const; tawashi_virtual_testing bool is_connected() const;
tawashi_virtual_testing void finalize_connection(); tawashi_virtual_testing void finalize_connection();
tawashi_virtual_testing SubmissionResult submit_pastie ( tawashi_virtual_testing SubmissionResult submit_pastie (
const boost::string_ref& parText, const boost::string_view& parText,
uint32_t parExpiry, uint32_t parExpiry,
const boost::string_ref& parLang, const boost::string_view& parLang,
const std::string& parRemoteIP const std::string& parRemoteIP
) const; ) const;
tawashi_virtual_testing boost::optional<std::string> retrieve_pastie (const boost::string_ref& parToken) const; tawashi_virtual_testing boost::optional<std::string> retrieve_pastie (const boost::string_view& parToken) const;
const std::vector<SubmittedPastie>& submitted_pasties() const; const std::vector<SubmittedPastie>& submitted_pasties() const;