summaryrefslogtreecommitdiffstats
path: root/indexlib/tests/tokenizer-test.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2024-01-23 10:13:00 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-01-23 10:13:00 +0900
commitd2f343cc239e1fa25c9581cf35bada96692c41db (patch)
tree52a60c0c804e42a990ffb27ca69c54d7467ea814 /indexlib/tests/tokenizer-test.cpp
parent3b3f9ec8f31978030c17309fae48335bea5c1587 (diff)
downloadtdepim-d2f343cc239e1fa25c9581cf35bada96692c41db.tar.gz
tdepim-d2f343cc239e1fa25c9581cf35bada96692c41db.zip
Replace auto_ptr
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'indexlib/tests/tokenizer-test.cpp')
-rw-r--r--indexlib/tests/tokenizer-test.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/indexlib/tests/tokenizer-test.cpp b/indexlib/tests/tokenizer-test.cpp
index 372859d90..1354ddcd6 100644
--- a/indexlib/tests/tokenizer-test.cpp
+++ b/indexlib/tests/tokenizer-test.cpp
@@ -9,8 +9,8 @@ using indexlib::detail::tokenizer;
using indexlib::detail::get_tokenizer;
void simple() {
- std::auto_ptr<tokenizer> tokenizer = get_tokenizer( "latin-1:european" );
- assert(tokenizer.get());
+ std::unique_ptr<tokenizer> tokenizer = get_tokenizer( "latin-1:european" );
+ assert(tokenizer);
std::vector<std::string> tokens = tokenizer->string_to_words( "one ,as, ''#`:ThReE, בבאחי" );
std::vector<std::string> expected;
expected.push_back( "ONE" );
@@ -26,8 +26,8 @@ void simple() {
}
void with_newlines() {
- std::auto_ptr<tokenizer> tokenizer = get_tokenizer( "latin-1:european" );
- assert(tokenizer.get());
+ std::unique_ptr<tokenizer> tokenizer = get_tokenizer( "latin-1:european" );
+ assert(tokenizer);
std::vector<std::string> tokens = tokenizer->string_to_words( "one\ntwo\nthree" );
std::vector<std::string> expected;
expected.push_back( "ONE" );
@@ -42,8 +42,8 @@ void with_newlines() {
}
void with_numbers() {
- std::auto_ptr<tokenizer> tokenizer = get_tokenizer( "latin-1:european" );
- assert(tokenizer.get());
+ std::unique_ptr<tokenizer> tokenizer = get_tokenizer( "latin-1:european" );
+ assert(tokenizer);
std::vector<std::string> tokens = tokenizer->string_to_words( "one 012 123 four" );
std::vector<std::string> expected;
expected.push_back( "ONE" );