ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
string_test.cc File Reference
#include "util/testing.h"
#include "util/string.h"
Include dependency graph for string_test.cc:

Go to the source code of this file.

Macros

#define TEST_NAME   "util/string"
 
#define TEST_STRING_INPLACE(Func, str, ref_str)
 

Functions

 BOOST_AUTO_TEST_CASE (TestStringPrintf)
 
 BOOST_AUTO_TEST_CASE (TestStringReplace)
 
 BOOST_AUTO_TEST_CASE (TestStringGetAfter)
 
 BOOST_AUTO_TEST_CASE (TestStringSplit)
 
 BOOST_AUTO_TEST_CASE (TestStringStartsWith)
 
 BOOST_AUTO_TEST_CASE (TestStringStrim)
 
 BOOST_AUTO_TEST_CASE (TestStringLeftString)
 
 BOOST_AUTO_TEST_CASE (TestStringStrimRight)
 
 BOOST_AUTO_TEST_CASE (TestStringToLower)
 
 BOOST_AUTO_TEST_CASE (TestStringToUpper)
 
 BOOST_AUTO_TEST_CASE (TestStringContains)
 

Macro Definition Documentation

◆ TEST_NAME

#define TEST_NAME   "util/string"

Definition at line 32 of file string_test.cc.

◆ TEST_STRING_INPLACE

#define TEST_STRING_INPLACE (   Func,
  str,
  ref_str 
)
Value:
{ \
std::string str_inplace = str; \
Func(&str_inplace); \
BOOST_CHECK_EQUAL(str_inplace, ref_str); \
}

Definition at line 39 of file string_test.cc.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/11]

BOOST_AUTO_TEST_CASE ( TestStringContains  )

Definition at line 216 of file string_test.cc.

References colmap::StringContains().

◆ BOOST_AUTO_TEST_CASE() [2/11]

BOOST_AUTO_TEST_CASE ( TestStringGetAfter  )

Definition at line 67 of file string_test.cc.

References colmap::StringGetAfter().

◆ BOOST_AUTO_TEST_CASE() [3/11]

BOOST_AUTO_TEST_CASE ( TestStringLeftString  )

◆ BOOST_AUTO_TEST_CASE() [4/11]

BOOST_AUTO_TEST_CASE ( TestStringPrintf  )

Definition at line 46 of file string_test.cc.

References colmap::StringPrintf().

◆ BOOST_AUTO_TEST_CASE() [5/11]

BOOST_AUTO_TEST_CASE ( TestStringReplace  )

Definition at line 58 of file string_test.cc.

References colmap::StringReplace().

◆ BOOST_AUTO_TEST_CASE() [6/11]

BOOST_AUTO_TEST_CASE ( TestStringSplit  )

Definition at line 77 of file string_test.cc.

References colmap::StringSplit().

◆ BOOST_AUTO_TEST_CASE() [7/11]

BOOST_AUTO_TEST_CASE ( TestStringStartsWith  )

Definition at line 125 of file string_test.cc.

References colmap::StringStartsWith().

◆ BOOST_AUTO_TEST_CASE() [8/11]

BOOST_AUTO_TEST_CASE ( TestStringStrim  )

Definition at line 135 of file string_test.cc.

References colmap::StringTrim(), and TEST_STRING_INPLACE.

◆ BOOST_AUTO_TEST_CASE() [9/11]

BOOST_AUTO_TEST_CASE ( TestStringStrimRight  )

◆ BOOST_AUTO_TEST_CASE() [10/11]

BOOST_AUTO_TEST_CASE ( TestStringToLower  )

Definition at line 178 of file string_test.cc.

References colmap::StringToLower(), and TEST_STRING_INPLACE.

◆ BOOST_AUTO_TEST_CASE() [11/11]

BOOST_AUTO_TEST_CASE ( TestStringToUpper  )

Definition at line 197 of file string_test.cc.

References colmap::StringToUpper(), and TEST_STRING_INPLACE.