text stringlengths 0 2.2M |
|---|
#endif
|
}
|
//*************************************************************************
|
TEST_FIXTURE(SetupFixture, test_assignment_excess)
|
{
|
TextBuffer buffer;
|
Text text(longer_text.begin(), longer_text.end(), buffer.data(), buffer.size());
|
TextBuffer buffer2;
|
Text other_text(buffer2.data(), buffer2.size());
|
other_text = text;
|
bool is_equal = Equal(text, other_text);
|
CHECK(is_equal);
|
#if ETL_STRING_TRUNCATION_CHECKS_ENABLED
|
CHECK(text.is_truncated());
|
CHECK(other_text.is_truncated());
|
#endif
|
}
|
//*************************************************************************
|
TEST_FIXTURE(SetupFixture, test_assignment_iterface)
|
{
|
TextBuffer buffer;
|
Text text1(initial_text.begin(), initial_text.end(), buffer.data(), buffer.size());
|
TextBuffer buffer2;
|
Text text2(buffer2.data(), buffer2.size());
|
IText& itext1 = text1;
|
IText& itext2 = text2;
|
itext2 = itext1;
|
bool is_equal = Equal(text1, text2);
|
CHECK(is_equal);
|
#if ETL_STRING_TRUNCATION_CHECKS_ENABLED
|
CHECK(!text1.is_truncated());
|
CHECK(!text2.is_truncated());
|
#endif
|
}
|
//*************************************************************************
|
TEST_FIXTURE(SetupFixture, test_assignment_iterface_excess)
|
{
|
TextBuffer buffer;
|
Text text1(longer_text.begin(), longer_text.end(), buffer.data(), buffer.size());
|
TextBuffer buffer2;
|
Text text2(buffer2.data(), buffer2.size());
|
IText& itext1 = text1;
|
IText& itext2 = text2;
|
itext2 = itext1;
|
bool is_equal = Equal(text1, text2);
|
CHECK(is_equal);
|
#if ETL_STRING_TRUNCATION_CHECKS_ENABLED
|
CHECK(text1.is_truncated());
|
CHECK(text2.is_truncated());
|
#endif
|
}
|
//*************************************************************************
|
TEST_FIXTURE(SetupFixture, test_self_assignment)
|
{
|
TextBuffer buffer;
|
Text text(initial_text.begin(), initial_text.end(), buffer.data(), buffer.size());
|
TextBuffer buffer2;
|
Text other_text(text, buffer2.data(), buffer2.size());
|
other_text = other_text;
|
bool is_equal = Equal(text, other_text);
|
CHECK(is_equal);
|
#if ETL_STRING_TRUNCATION_CHECKS_ENABLED
|
CHECK(!text.is_truncated());
|
CHECK(!other_text.is_truncated());
|
#endif
|
}
|
//*************************************************************************
|
TEST_FIXTURE(SetupFixture, test_self_assignment_excess)
|
{
|
TextBuffer buffer;
|
Text text(longer_text.begin(), longer_text.end(), buffer.data(), buffer.size());
|
TextBuffer buffer2;
|
Text other_text(text, buffer2.data(), buffer2.size());
|
other_text = other_text;
|
bool is_equal = Equal(text, other_text);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.