FString unit test fix
This commit is contained in:
parent
96f2f28f21
commit
24696ffcd1
|
@ -2254,7 +2254,7 @@ bool FVTerm::skipUnchangedCharacters (uInt& x, uInt xmax, uInt y) const
|
|||
|
||||
for (uInt i = x + 1; i <= xmax; i++)
|
||||
{
|
||||
auto& ch = vt->data[y * uInt(vt->width) + i];
|
||||
const auto& ch = vt->data[y * uInt(vt->width) + i];
|
||||
|
||||
if ( ch.attr.bit.no_changes )
|
||||
count++;
|
||||
|
@ -2999,7 +2999,7 @@ inline void FVTerm::appendChar (FChar& next_char) const
|
|||
inline void FVTerm::appendAttributes (FChar& next_attr) const
|
||||
{
|
||||
// generate attribute string for the next character
|
||||
const auto attr_str = FTerm::changeAttribute (term_attribute, next_attr);
|
||||
const auto& attr_str = FTerm::changeAttribute (term_attribute, next_attr);
|
||||
|
||||
if ( attr_str )
|
||||
appendOutputBuffer (attr_str);
|
||||
|
|
|
@ -162,7 +162,6 @@ void FStringTest::noArgumentTest()
|
|||
CPPUNIT_ASSERT ( empty.isEmpty() );
|
||||
CPPUNIT_ASSERT ( empty.getLength() == 0 );
|
||||
CPPUNIT_ASSERT ( empty.capacity() == 0 );
|
||||
CPPUNIT_ASSERT ( empty.getUTF8length() == 0 );
|
||||
CPPUNIT_ASSERT ( empty.wc_str() == nullptr );
|
||||
CPPUNIT_ASSERT ( empty.c_str() == nullptr );
|
||||
CPPUNIT_ASSERT_EQUAL ( empty.toString(), std::string() );
|
||||
|
@ -657,7 +656,6 @@ void FStringTest::equalTest()
|
|||
constexpr char cstr[] = "abc";
|
||||
CPPUNIT_ASSERT ( str == cstr );
|
||||
CPPUNIT_ASSERT ( str.getLength() == 3 );
|
||||
CPPUNIT_ASSERT ( str.getUTF8length() == 3 );
|
||||
CPPUNIT_ASSERT ( str.capacity() == 18 );
|
||||
CPPUNIT_ASSERT ( strncmp(cstr, str.c_str(), 3) == 0 );
|
||||
|
||||
|
@ -706,8 +704,6 @@ void FStringTest::notEqualTest()
|
|||
CPPUNIT_ASSERT ( strlen(s1.c_str()) == 3 );
|
||||
CPPUNIT_ASSERT ( s2.getLength() == 3 );
|
||||
CPPUNIT_ASSERT ( strlen(s2.c_str()) == 6 );
|
||||
CPPUNIT_ASSERT ( s1.getUTF8length() == 3 );
|
||||
CPPUNIT_ASSERT ( s2.getUTF8length() == 3 );
|
||||
CPPUNIT_ASSERT ( s1.capacity() == 18 );
|
||||
CPPUNIT_ASSERT ( s2.capacity() == 18 );
|
||||
CPPUNIT_ASSERT ( strncmp(cstr, s1.c_str(), 3) != 0 );
|
||||
|
|
Loading…
Reference in New Issue